GitHub Raw JSON API

archestra-ai / archestra

3,757 TypeScript

Enterprise AI Platform with guardrails, MCP registry, gateway & orchestrator

Archestra Specification

Located in docs/openapi.json on branch HEAD

3.0.0 JSON 460 Endpoints 13314.9 KB

Operations & Route Endpoints (100)

GET /v1/a2a/{agentId}/.well-known/agent.json
POST /v1/a2a/{agentId}
GET /v2/a2a/agents
GET /v2/a2a/{agentId}/.well-known/agent-card.json
POST /v2/a2a/{agentId}
GET /api/agents
getAgents
POST /api/agents
createAgent
GET /api/agents/all
getAllAgents
GET /api/mcp-gateways/default
getDefaultMcpGateway
GET /api/llm-proxy/default
getDefaultLlmProxy
POST /api/agents/import
importAgent
GET /api/agents/{id}
getAgent
PUT /api/agents/{id}
updateAgent
DELETE /api/agents/{id}
deleteAgent
GET /api/agents/{id}/versions
getAgentVersions
GET /api/agents/{id}/versions/{version}
getAgentVersion
POST /api/agents/{id}/versions/{version}/restore
restoreAgentVersion
POST /api/agents/{id}/clone
cloneAgent
GET /api/agents/{id}/export
exportAgent
GET /api/agents/{id}/tool-exclusions
getAgentToolExclusions
PUT /api/agents/{id}/tool-exclusions
updateAgentToolExclusions
GET /api/agents/{id}/subagent-exclusions
getAgentSubagentExclusions
PUT /api/agents/{id}/subagent-exclusions
updateAgentSubagentExclusions
GET /api/agents/{id}/skills
getAgentSkills
PUT /api/agents/{id}/skills
updateAgentSkills
GET /api/agents/{id}/skill-exclusions
getAgentSkillExclusions
PUT /api/agents/{id}/skill-exclusions
updateAgentSkillExclusions
POST /api/agents/{id}/restore
restoreAgent
DELETE /api/agents/{id}/permanent
permanentlyDeleteAgent
GET /api/agents/labels/keys
getLabelKeys
GET /api/agents/labels/values
getLabelValues
GET /api/members/default-agent
getMemberDefaultAgent
GET /api/members/default-model
getMemberDefaultModel
PUT /api/members/default-model
updateMemberDefaultModel
GET /api/agent-tools
getAllAgentTools
POST /api/agents/{agentId}/tools/{toolId}
assignToolToAgent
DELETE /api/agents/{agentId}/tools/{toolId}
unassignToolFromAgent
POST /api/agents/tools/bulk-assign
bulkAssignTools
POST /api/agents/tools/bulk-update
bulkUpdateAgentTools
POST /api/agent-tools/auto-configure-policies
autoConfigureAgentToolPolicies
GET /api/agents/{agentId}/tools
getAgentTools
PATCH /api/agent-tools/{id}
updateAgentTool
GET /api/agents/{agentId}/delegations
getAgentDelegations
POST /api/agents/{agentId}/delegations
syncAgentDelegations
DELETE /api/agents/{agentId}/delegations/{targetAgentId}
deleteAgentDelegation
GET /api/agent-delegations
getAllDelegationConnections
POST /v1/anthropic/v1/messages
anthropicMessagesWithDefaultAgent
POST /v1/anthropic/{agentId}/v1/messages
anthropicMessagesWithAgent
GET /v1/anthropic/v1/models
anthropicListModelsWithDefaultAgent
GET /v1/anthropic/{agentId}/v1/models
anthropicListModelsWithAgent
GET /api/api-keys
getApiKeys
POST /api/api-keys
createApiKey
GET /api/api-keys/{id}
getApiKey
DELETE /api/api-keys/{id}
deleteApiKey
POST /api/app-gallery/device/start
appGalleryDeviceAuthStart
POST /api/app-gallery/device/poll
appGalleryDeviceAuthPoll
POST /api/app-recordings/enhance
enhanceAppRecording
POST /api/app-recordings/render
renderAppRecordingVideo
GET /api/app-recordings/render/{jobId}
getAppRecordingRenderStatus
DELETE /api/app-recordings/render/{jobId}
cancelAppRecordingRender
GET /api/app-recordings/render/{jobId}/video
downloadAppRecordingVideo
GET /api/app-recording/review
reviewAppRecording
GET /api/apps
getApps
POST /api/apps
createApp
GET /api/apps/external/{catalogId}
getExternalApp
GET /api/apps/labels/keys
getAppLabelKeys
GET /api/apps/labels/values
getAppLabelValues
GET /api/app-templates
getAppTemplates
POST /api/apps/{appId}/open-in-chat
openAppInChat
POST /api/apps/external/{mcpServerId}/open-in-chat
openExternalAppInChat
PUT /api/apps/{appId}/pin
pinApp
DELETE /api/apps/{appId}/pin
unpinApp
PUT /api/apps/external/{mcpServerId}/pin
pinExternalApp
DELETE /api/apps/external/{mcpServerId}/pin
unpinExternalApp
GET /api/apps/{appId}
getApp
PATCH /api/apps/{appId}
updateApp
DELETE /api/apps/{appId}
deleteApp
POST /api/apps/{appId}/enable
enableApp
POST /api/apps/{appId}/disable
disableApp
POST /api/apps/{appId}/lock
lockApp
POST /api/apps/{appId}/unlock
unlockApp
GET /api/apps/{appId}/versions
getAppVersions
GET /api/apps/{appId}/versions/{version}
getAppVersion
GET /api/apps/{appId}/tools
getAppTools
POST /api/apps/{appId}/diagnostics
postAppRenderDiagnostics
POST /api/apps/{appId}/screenshot
postAppRenderScreenshot
POST /api/apps/{appId}/tools/{toolId}
assignToolToApp
DELETE /api/apps/{appId}/tools/{toolId}
unassignToolFromApp
POST /v1/archestra/chat/completions
archestraChatCompletionsWithDefaultAgent
POST /v1/archestra/{agentId}/chat/completions
archestraChatCompletionsWithAgent
GET /api/audit-logs
getAuditLogs
GET /api/audit-logs/{id}
getAuditLog
GET /api/auth-state
getAuthState
GET /api/auth/default-credentials-status
getDefaultCredentialsStatus
POST /api/auth/organization/remove-member
GET /api/auth/oauth2/client-info
getOAuthClientInfo
GET /api/auth/oauth2/authorize
POST /api/auth/oauth2/token
POST /api/auth/oauth2/revoke
POST /api/auth/oauth2/consent
submitOAuthConsent
Raw JSON Specification
{
  "openapi": "3.0.0",
  "info": {
    "title": "Archestra",
    "version": "1.3.36"
  },
  "components": {
    "schemas": {
      "TextSearchLanguageInput": {
        "type": "string",
        "enum": [
          "simple",
          "arabic",
          "armenian",
          "basque",
          "catalan",
          "danish",
          "dutch",
          "english",
          "finnish",
          "french",
          "german",
          "greek",
          "hindi",
          "hungarian",
          "indonesian",
          "irish",
          "italian",
          "lithuanian",
          "nepali",
          "norwegian",
          "portuguese",
          "romanian",
          "russian",
          "serbian",
          "spanish",
          "swedish",
          "tamil",
          "turkish",
          "yiddish"
        ]
      },
      "EmbeddingDimensionsInput": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991,
        "enum": [
          3072,
          1536,
          1024,
          768,
          384
        ]
      },
      "LocalConfigEnvironmentDefaultInput": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      },
      "OpenAiChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "OpenAiChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ]
      },
      "GeminiGenerateContentRequestInput": {
        "type": "object",
        "properties": {
          "contents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "description": "The role of the author of this content."
                },
                "parts": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "text"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "inlineData": {
                                "type": "object",
                                "properties": {
                                  "mimeType": {
                                    "type": "string"
                                  },
                                  "data": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "data"
                                ]
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "inlineData"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "functionCall": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "args": {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                },
                                "required": [
                                  "name"
                                ]
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "functionCall"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "functionResponse": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "response": {
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "willContinue": {
                                    "type": "boolean"
                                  },
                                  "scheduling": {
                                    "type": "string",
                                    "enum": [
                                      "SCHEDULING_UNSPECIFIED",
                                      "SILENT",
                                      "WHEN_IDLE",
                                      "INTERRUPT"
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "response"
                                ]
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "functionResponse"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "fileData": {
                                "type": "object",
                                "properties": {
                                  "mimeType": {
                                    "type": "string"
                                  },
                                  "fileUri": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "fileUri"
                                ]
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "fileData"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "language": {
                                "type": "string",
                                "enum": [
                                  "LANGUAGE_UNSPECIFIED",
                                  "PYTHON"
                                ]
                              },
                              "executableCode": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code"
                                ]
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "language",
                              "executableCode"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "codeExecutionResult": {
                                "type": "object",
                                "properties": {
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "OUTCOME_UNSPECIFIED",
                                      "OUTCOME_OK",
                                      "OUTCOME_FAILED",
                                      "OUTCOME_DEADLINE_EXCEEDED"
                                    ],
                                    "description": "Outcome of the code execution."
                                  },
                                  "output": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "outcome"
                                ]
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "codeExecutionResult"
                            ]
                          }
                        ]
                      }
                    ],
                    "description": "https://ai.google.dev/api/caching#Part"
                  }
                }
              },
              "required": [
                "role",
                "parts"
              ],
              "description": "\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"
            },
            "description": "The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request"
          },
          "tools": {
            "description": "A list of Tools the Model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the Model. Supported Tools are Function and codeExecution. Refer to the Function calling and the Code execution guides to learn more.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "functionDeclarations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63."
                          },
                          "description": {
                            "type": "string",
                            "description": "A brief description of the function."
                          },
                          "behavior": {
                            "description": "https://ai.google.dev/api/caching#Behavior",
                            "type": "string",
                            "enum": [
                              "UNSPECIFIED",
                              "BLOCKING",
                              "NON_BLOCKING"
                            ]
                          },
                          "parameters": {
                            "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "parametersJsonSchema": {},
                          "response": {},
                          "responseJsonSchema": {}
                        },
                        "required": [
                          "name",
                          "description"
                        ],
                        "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                      }
                    },
                    "googleSearchRetrieval": {
                      "type": "object",
                      "properties": {
                        "dynamicRetrievalConfig": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "MODE_UNSPECIFIED",
                                "MODE_DYNAMIC"
                              ],
                              "description": "https://ai.google.dev/api/caching#Mode"
                            },
                            "dynamicThreshold": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "mode",
                            "dynamicThreshold"
                          ],
                          "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                        }
                      },
                      "required": [
                        "dynamicRetrievalConfig"
                      ],
                      "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                    },
                    "codeExecution": {},
                    "googleSearch": {},
                    "urlContext": {}
                  },
                  "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
                }
              },
              {
                "type": "object",
                "properties": {
                  "functionDeclarations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63."
                        },
                        "description": {
                          "type": "string",
                          "description": "A brief description of the function."
                        },
                        "behavior": {
                          "description": "https://ai.google.dev/api/caching#Behavior",
                          "type": "string",
                          "enum": [
                            "UNSPECIFIED",
                            "BLOCKING",
                            "NON_BLOCKING"
                          ]
                        },
                        "parameters": {
                          "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "parametersJsonSchema": {},
                        "response": {},
                        "responseJsonSchema": {}
                      },
                      "required": [
                        "name",
                        "description"
                      ],
                      "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                    }
                  },
                  "googleSearchRetrieval": {
                    "type": "object",
                    "properties": {
                      "dynamicRetrievalConfig": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "MODE_UNSPECIFIED",
                              "MODE_DYNAMIC"
                            ],
                            "description": "https://ai.google.dev/api/caching#Mode"
                          },
                          "dynamicThreshold": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "mode",
                          "dynamicThreshold"
                        ],
                        "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                      }
                    },
                    "required": [
                      "dynamicRetrievalConfig"
                    ],
                    "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                  },
                  "codeExecution": {},
                  "googleSearch": {},
                  "urlContext": {}
                },
                "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
              }
            ]
          },
          "toolConfig": {
            "description": "Tool configuration for any Tool specified in the request.",
            "type": "object",
            "properties": {
              "functionCallingConfig": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "AUTO",
                      "ANY",
                      "NONE"
                    ]
                  },
                  "allowedFunctionNames": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "mode"
                ]
              }
            },
            "required": [
              "functionCallingConfig"
            ]
          },
          "safetySettings": {
            "description": "A list of unique SafetySetting instances for blocking unsafe content.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "enum": [
                    "HARM_CATEGORY_UNSPECIFIED",
                    "HARM_CATEGORY_DEROGATORY",
                    "HARM_CATEGORY_TOXICITY",
                    "HARM_CATEGORY_VIOLENCE",
                    "HARM_CATEGORY_SEXUAL",
                    "HARM_CATEGORY_MEDICAL",
                    "HARM_CATEGORY_DANGEROUS",
                    "HARM_CATEGORY_HARASSMENT",
                    "HARM_CATEGORY_HATE_SPEECH",
                    "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                    "HARM_CATEGORY_DANGEROUS_CONTENT",
                    "HARM_CATEGORY_CIVIC_INTEGRITY"
                  ],
                  "description": "\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"
                },
                "threshold": {
                  "type": "string",
                  "enum": [
                    "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
                    "BLOCK_LOW_AND_ABOVE",
                    "BLOCK_MEDIUM_AND_ABOVE",
                    "BLOCK_ONLY_HIGH",
                    "BLOCK_NONE",
                    "OFF"
                  ],
                  "description": "\n      Controls the probability threshold at which harm is blocked.\n\n      https://ai.google.dev/api/generate-content#HarmBlockThreshold\n      "
                }
              },
              "required": [
                "category",
                "threshold"
              ],
              "description": "https://ai.google.dev/api/generate-content#v1beta.SafetySetting"
            }
          },
          "systemInstruction": {
            "type": "object",
            "properties": {
              "parts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "text"
                  ]
                }
              }
            },
            "required": [
              "parts"
            ],
            "description": "Developer set system instruction(s). Currently, text only."
          },
          "generationConfig": {
            "type": "object",
            "properties": {
              "stopSequences": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "responseMimeType": {
                "type": "string"
              },
              "responseSchema": {},
              "_responseJsonSchema": {},
              "responseJsonSchema": {},
              "responseModalities": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "MODALITY_UNSPECIFIED",
                    "TEXT",
                    "IMAGE",
                    "AUDIO"
                  ],
                  "description": "https://ai.google.dev/api/generate-content#Modality"
                }
              },
              "candidateCount": {
                "type": "number"
              },
              "maxOutputTokens": {
                "type": "number"
              },
              "temperature": {
                "type": "number"
              },
              "topP": {
                "type": "number"
              },
              "topK": {
                "type": "number"
              },
              "seed": {
                "type": "number"
              },
              "presencePenalty": {
                "type": "number"
              },
              "frequencyPenalty": {
                "type": "number"
              },
              "responseLogprobs": {
                "type": "boolean"
              },
              "logProbs": {
                "type": "number"
              },
              "enableEnhancedCivicAnswers": {
                "type": "boolean"
              },
              "speechConfig": {},
              "thinkingConfig": {},
              "imageConfig": {},
              "mediaResolution": {
                "description": "https://ai.google.dev/api/generate-content#MediaResolution",
                "type": "string",
                "enum": [
                  "MEDIA_RESOLUTION_UNSPECIFIED",
                  "MEDIA_RESOLUTION_LOW",
                  "MEDIA_RESOLUTION_MEDIUM",
                  "MEDIA_RESOLUTION_HIGH"
                ]
              }
            },
            "description": "https://ai.google.dev/api/generate-content#v1beta.GenerationConfig"
          },
          "cachedContent": {
            "description": "The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}",
            "type": "string"
          },
          "config": {
            "type": "object",
            "properties": {
              "tools": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "functionDeclarations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63."
                              },
                              "description": {
                                "type": "string",
                                "description": "A brief description of the function."
                              },
                              "behavior": {
                                "description": "https://ai.google.dev/api/caching#Behavior",
                                "type": "string",
                                "enum": [
                                  "UNSPECIFIED",
                                  "BLOCKING",
                                  "NON_BLOCKING"
                                ]
                              },
                              "parameters": {
                                "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                                "type": "object",
                                "additionalProperties": {}
                              },
                              "parametersJsonSchema": {},
                              "response": {},
                              "responseJsonSchema": {}
                            },
                            "required": [
                              "name",
                              "description"
                            ],
                            "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                          }
                        },
                        "googleSearchRetrieval": {
                          "type": "object",
                          "properties": {
                            "dynamicRetrievalConfig": {
                              "type": "object",
                              "properties": {
                                "mode": {
                                  "type": "string",
                                  "enum": [
                                    "MODE_UNSPECIFIED",
                                    "MODE_DYNAMIC"
                                  ],
                                  "description": "https://ai.google.dev/api/caching#Mode"
                                },
                                "dynamicThreshold": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "mode",
                                "dynamicThreshold"
                              ],
                              "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                            }
                          },
                          "required": [
                            "dynamicRetrievalConfig"
                          ],
                          "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                        },
                        "codeExecution": {},
                        "googleSearch": {},
                        "urlContext": {}
                      },
                      "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "functionDeclarations": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63."
                            },
                            "description": {
                              "type": "string",
                              "description": "A brief description of the function."
                            },
                            "behavior": {
                              "description": "https://ai.google.dev/api/caching#Behavior",
                              "type": "string",
                              "enum": [
                                "UNSPECIFIED",
                                "BLOCKING",
                                "NON_BLOCKING"
                              ]
                            },
                            "parameters": {
                              "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "parametersJsonSchema": {},
                            "response": {},
                            "responseJsonSchema": {}
                          },
                          "required": [
                            "name",
                            "description"
                          ],
                          "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                        }
                      },
                      "googleSearchRetrieval": {
                        "type": "object",
                        "properties": {
                          "dynamicRetrievalConfig": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "MODE_UNSPECIFIED",
                                  "MODE_DYNAMIC"
                                ],
                                "description": "https://ai.google.dev/api/caching#Mode"
                              },
                              "dynamicThreshold": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "mode",
                              "dynamicThreshold"
                            ],
                            "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                          }
                        },
                        "required": [
                          "dynamicRetrievalConfig"
                        ],
                        "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                      },
                      "codeExecution": {},
                      "googleSearch": {},
                      "urlContext": {}
                    },
                    "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
                  }
                ]
              },
              "toolConfig": {
                "description": "Tool configuration for any Tool specified in the request.",
                "type": "object",
                "properties": {
                  "functionCallingConfig": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "AUTO",
                          "ANY",
                          "NONE"
                        ]
                      },
                      "allowedFunctionNames": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "mode"
                    ]
                  }
                },
                "required": [
                  "functionCallingConfig"
                ]
              }
            }
          }
        },
        "required": [
          "contents"
        ]
      },
      "GeminiGenerateContentResponseInput": {
        "type": "object",
        "properties": {
          "candidates": {
            "description": "Candidate responses from the model",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "content": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "description": "The role of the author of this content."
                    },
                    "parts": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "inlineData": {
                                    "type": "object",
                                    "properties": {
                                      "mimeType": {
                                        "type": "string"
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "data"
                                    ]
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "inlineData"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "functionCall": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "args": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "name"
                                    ]
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "functionCall"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "functionResponse": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "response": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "willContinue": {
                                        "type": "boolean"
                                      },
                                      "scheduling": {
                                        "type": "string",
                                        "enum": [
                                          "SCHEDULING_UNSPECIFIED",
                                          "SILENT",
                                          "WHEN_IDLE",
                                          "INTERRUPT"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "response"
                                    ]
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "functionResponse"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "fileData": {
                                    "type": "object",
                                    "properties": {
                                      "mimeType": {
                                        "type": "string"
                                      },
                                      "fileUri": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "fileUri"
                                    ]
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "fileData"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "language": {
                                    "type": "string",
                                    "enum": [
                                      "LANGUAGE_UNSPECIFIED",
                                      "PYTHON"
                                    ]
                                  },
                                  "executableCode": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "code"
                                    ]
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "language",
                                  "executableCode"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "codeExecutionResult": {
                                    "type": "object",
                                    "properties": {
                                      "outcome": {
                                        "type": "string",
                                        "enum": [
                                          "OUTCOME_UNSPECIFIED",
                                          "OUTCOME_OK",
                                          "OUTCOME_FAILED",
                                          "OUTCOME_DEADLINE_EXCEEDED"
                                        ],
                                        "description": "Outcome of the code execution."
                                      },
                                      "output": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "outcome"
                                    ]
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "codeExecutionResult"
                                ]
                              }
                            ]
                          }
                        ],
                        "description": "https://ai.google.dev/api/caching#Part"
                      }
                    }
                  },
                  "required": [
                    "role",
                    "parts"
                  ],
                  "description": "\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"
                },
                "finishReason": {
                  "description": "\n  The reason why the model stopped generating tokens.\n\n  If empty, the model has not stopped generating tokens.\n\n  https://ai.google.dev/api/generate-content#FinishReason\n",
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FINISH_REASON_UNSPECIFIED",
                        "STOP",
                        "MAX_TOKENS",
                        "SAFETY",
                        "RECITATION",
                        "LANGUAGE",
                        "OTHER",
                        "BLOCKLIST",
                        "PROHIBITED_CONTENT",
                        "SPII",
                        "MALFORMED_FUNCTION_CALL",
                        "IMAGE_SAFETY",
                        "IMAGE_PROHIBITED_CONTENT",
                        "IMAGE_OTHER",
                        "NO_IMAGE",
                        "IMAGE_RECITATION",
                        "UNEXPECTED_TOOL_CALL",
                        "TOO_MANY_TOOL_CALLS"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "safetyRatings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "category": {
                        "type": "string",
                        "enum": [
                          "HARM_CATEGORY_UNSPECIFIED",
                          "HARM_CATEGORY_DEROGATORY",
                          "HARM_CATEGORY_TOXICITY",
                          "HARM_CATEGORY_VIOLENCE",
                          "HARM_CATEGORY_SEXUAL",
                          "HARM_CATEGORY_MEDICAL",
                          "HARM_CATEGORY_DANGEROUS",
                          "HARM_CATEGORY_HARASSMENT",
                          "HARM_CATEGORY_HATE_SPEECH",
                          "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                          "HARM_CATEGORY_DANGEROUS_CONTENT",
                          "HARM_CATEGORY_CIVIC_INTEGRITY"
                        ],
                        "description": "\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"
                      },
                      "probability": {
                        "type": "string",
                        "enum": [
                          "HARM_PROBABILITY_UNSPECIFIED",
                          "NEGLIGIBLE",
                          "LOW",
                          "MEDIUM",
                          "HIGH"
                        ],
                        "description": "https://ai.google.dev/api/generate-content#HarmProbability"
                      },
                      "blocked": {
                        "description": "Was this content blocked because of this rating?",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "category",
                      "probability"
                    ],
                    "description": "https://ai.google.dev/api/generate-content#v1beta.SafetyRating"
                  }
                },
                "citationMetadata": {
                  "description": "https://ai.google.dev/api/generate-content#citationmetadata",
                  "type": "object",
                  "properties": {
                    "citationSources": {
                      "type": "array",
                      "items": {
                        "description": "https://ai.google.dev/api/generate-content#CitationSource",
                        "type": "object",
                        "properties": {
                          "startIndex": {
                            "type": "number"
                          },
                          "endIndex": {
                            "type": "number"
                          },
                          "uri": {
                            "type": "string"
                          },
                          "license": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "citationSources"
                  ]
                },
                "tokenCount": {
                  "type": "number"
                },
                "groundingAttributions": {
                  "type": "array",
                  "items": {}
                },
                "groundingMetadata": {},
                "avgLogprobs": {
                  "type": "number"
                },
                "logprobsResult": {},
                "urlContextMetadata": {},
                "index": {
                  "description": "Index of the candidate in the list of response candidates.",
                  "type": "number"
                },
                "finishMessage": {
                  "description": "Details the reason why the model stopped generating tokens. This is populated only when finishReason is set.",
                  "type": "string"
                }
              },
              "description": "https://ai.google.dev/api/generate-content#candidate"
            }
          },
          "promptFeedback": {
            "description": "Returns the prompt's feedback related to the content filters",
            "type": "object",
            "properties": {
              "blockReason": {
                "description": "Specifies the reason why the prompt was blocked. https://ai.google.dev/api/generate-content#BlockReason",
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "BLOCK_REASON_UNSPECIFIED",
                      "SAFETY",
                      "OTHER",
                      "BLOCKLIST",
                      "PROHIBITED_CONTENT",
                      "IMAGE_SAFETY"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "safetyRatings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string",
                      "enum": [
                        "HARM_CATEGORY_UNSPECIFIED",
                        "HARM_CATEGORY_DEROGATORY",
                        "HARM_CATEGORY_TOXICITY",
                        "HARM_CATEGORY_VIOLENCE",
                        "HARM_CATEGORY_SEXUAL",
                        "HARM_CATEGORY_MEDICAL",
                        "HARM_CATEGORY_DANGEROUS",
                        "HARM_CATEGORY_HARASSMENT",
                        "HARM_CATEGORY_HATE_SPEECH",
                        "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                        "HARM_CATEGORY_DANGEROUS_CONTENT",
                        "HARM_CATEGORY_CIVIC_INTEGRITY"
                      ],
                      "description": "\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"
                    },
                    "probability": {
                      "type": "string",
                      "enum": [
                        "HARM_PROBABILITY_UNSPECIFIED",
                        "NEGLIGIBLE",
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#HarmProbability"
                    },
                    "blocked": {
                      "description": "Was this content blocked because of this rating?",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "category",
                    "probability"
                  ],
                  "description": "https://ai.google.dev/api/generate-content#v1beta.SafetyRating"
                }
              }
            }
          },
          "usageMetadata": {
            "description": "Metadata on the generation requests' token usage",
            "type": "object",
            "properties": {
              "promptTokenCount": {
                "type": "number"
              },
              "cachedContentTokenCount": {
                "type": "number"
              },
              "candidatesTokenCount": {
                "type": "number"
              },
              "toolUsePromptTokenCount": {
                "type": "number"
              },
              "thoughtsTokenCount": {
                "type": "number"
              },
              "totalTokenCount": {
                "type": "number"
              },
              "promptTokensDetails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "modality": {
                      "type": "string",
                      "enum": [
                        "MODALITY_UNSPECIFIED",
                        "TEXT",
                        "IMAGE",
                        "AUDIO"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#Modality"
                    },
                    "tokenCount": {
                      "type": "number",
                      "description": "Number of tokens"
                    }
                  },
                  "required": [
                    "modality",
                    "tokenCount"
                  ],
                  "description": "https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"
                }
              },
              "cacheTokensDetails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "modality": {
                      "type": "string",
                      "enum": [
                        "MODALITY_UNSPECIFIED",
                        "TEXT",
                        "IMAGE",
                        "AUDIO"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#Modality"
                    },
                    "tokenCount": {
                      "type": "number",
                      "description": "Number of tokens"
                    }
                  },
                  "required": [
                    "modality",
                    "tokenCount"
                  ],
                  "description": "https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"
                }
              },
              "candidatesTokensDetails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "modality": {
                      "type": "string",
                      "enum": [
                        "MODALITY_UNSPECIFIED",
                        "TEXT",
                        "IMAGE",
                        "AUDIO"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#Modality"
                    },
                    "tokenCount": {
                      "type": "number",
                      "description": "Number of tokens"
                    }
                  },
                  "required": [
                    "modality",
                    "tokenCount"
                  ],
                  "description": "https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"
                }
              },
              "toolUsePromptTokensDetails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "modality": {
                      "type": "string",
                      "enum": [
                        "MODALITY_UNSPECIFIED",
                        "TEXT",
                        "IMAGE",
                        "AUDIO"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#Modality"
                    },
                    "tokenCount": {
                      "type": "number",
                      "description": "Number of tokens"
                    }
                  },
                  "required": [
                    "modality",
                    "tokenCount"
                  ],
                  "description": "https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"
                }
              }
            }
          },
          "modelVersion": {
            "description": "The model version used to generate the response.",
            "type": "string"
          },
          "responseId": {
            "description": "The unique response ID.",
            "type": "string"
          }
        }
      },
      "AnthropicMessagesRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "content": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              },
                              "citations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              }
                            },
                            "required": [
                              "text",
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "image"
                                ]
                              },
                              "source": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "base64"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string"
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "url"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ]
                                  }
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              }
                            },
                            "required": [
                              "type",
                              "source"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "document"
                                ]
                              },
                              "source": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "base64"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf"
                                        ]
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "text/plain"
                                        ]
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "url"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "content"
                                        ]
                                      },
                                      "content": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "array",
                                                      "items": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "type"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string"
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ]
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "content"
                                    ]
                                  }
                                ]
                              },
                              "title": {
                                "nullable": true,
                                "type": "string"
                              },
                              "context": {
                                "nullable": true,
                                "type": "string"
                              },
                              "citations": {
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "enabled": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "enabled"
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              }
                            },
                            "required": [
                              "type",
                              "source"
                            ],
                            "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "thinking"
                                ]
                              },
                              "thinking": {
                                "type": "string"
                              },
                              "signature": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "thinking",
                              "signature"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "redacted_thinking"
                                ]
                              },
                              "data": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "data"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "input": {},
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "tool_use"
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              }
                            },
                            "required": [
                              "id",
                              "input",
                              "name",
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "tool_use_id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "tool_result"
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              },
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "text"
                                              ]
                                            },
                                            "cache_control": {
                                              "nullable": true
                                            },
                                            "citations": {
                                              "nullable": true,
                                              "type": "array",
                                              "items": {}
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "type"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "image"
                                              ]
                                            },
                                            "source": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "base64"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string"
                                                    },
                                                    "data": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "url"
                                                      ]
                                                    },
                                                    "url": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "url"
                                                  ]
                                                }
                                              ]
                                            },
                                            "cache_control": {
                                              "nullable": true
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "source"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "document"
                                              ]
                                            },
                                            "source": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "base64"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "application/pdf"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text/plain"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "url"
                                                      ]
                                                    },
                                                    "url": {
                                                      "type": "string",
                                                      "format": "uri"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "url"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "content"
                                                      ]
                                                    },
                                                    "content": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "text": {
                                                                    "type": "string"
                                                                  },
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "text"
                                                                    ]
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  },
                                                                  "citations": {
                                                                    "nullable": true,
                                                                    "type": "array",
                                                                    "items": {}
                                                                  }
                                                                },
                                                                "required": [
                                                                  "text",
                                                                  "type"
                                                                ]
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "image"
                                                                    ]
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "base64"
                                                                            ]
                                                                          },
                                                                          "media_type": {
                                                                            "type": "string"
                                                                          },
                                                                          "data": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "media_type",
                                                                          "data"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "url"
                                                                            ]
                                                                          },
                                                                          "url": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "url"
                                                                        ]
                                                                      }
                                                                    ]
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "source"
                                                                ]
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "content"
                                                  ]
                                                }
                                              ]
                                            },
                                            "title": {
                                              "nullable": true,
                                              "type": "string"
                                            },
                                            "context": {
                                              "nullable": true,
                                              "type": "string"
                                            },
                                            "citations": {
                                              "nullable": true,
                                              "type": "object",
                                              "properties": {
                                                "enabled": {
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "enabled"
                                              ]
                                            },
                                            "cache_control": {
                                              "nullable": true
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "source"
                                          ],
                                          "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                        }
                                      ]
                                    }
                                  }
                                ]
                              },
                              "is_error": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "tool_use_id",
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "search_result",
                                  "server_tool_use",
                                  "web_search_tool_result",
                                  "web_fetch_tool_result",
                                  "code_execution_tool_result",
                                  "bash_code_execution_tool_result",
                                  "text_editor_code_execution_tool_result",
                                  "tool_search_tool_result",
                                  "container_upload"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    }
                  ]
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system"
                  ]
                }
              },
              "required": [
                "content",
                "role"
              ]
            }
          },
          "max_tokens": {
            "type": "number"
          },
          "container": {
            "nullable": true,
            "type": "string"
          },
          "context_management": {
            "nullable": true,
            "type": "object",
            "properties": {}
          },
          "mcp_servers": {
            "type": "array",
            "items": {}
          },
          "metadata": {
            "type": "object",
            "properties": {
              "user_id": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "user_id"
            ]
          },
          "output_config": {
            "type": "object",
            "properties": {
              "effort": {
                "nullable": true,
                "type": "string"
              },
              "format": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "json_schema"
                    ]
                  },
                  "schema": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "type",
                  "schema"
                ]
              }
            }
          },
          "service_tier": {},
          "speed": {
            "type": "string",
            "enum": [
              "fast",
              "standard"
            ]
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stream": {
            "type": "boolean"
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "text"
                    ]
                  },
                  "text": {
                    "type": "string"
                  },
                  "cache_control": {
                    "nullable": true
                  },
                  "citations": {
                    "nullable": true,
                    "type": "array",
                    "items": {}
                  }
                },
                "required": [
                  "type",
                  "text"
                ]
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "cache_control": {
                      "nullable": true
                    },
                    "citations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                }
              }
            ]
          },
          "temperature": {
            "type": "number"
          },
          "thinking": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "budget_tokens": {
                    "type": "number"
                  },
                  "display": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "summarized",
                      "omitted"
                    ]
                  }
                },
                "required": [
                  "type",
                  "budget_tokens"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "adaptive"
                    ]
                  },
                  "display": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "summarized",
                      "omitted"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              }
            ]
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "auto"
                    ]
                  },
                  "disable_parallel_tool_use": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "any"
                    ]
                  },
                  "disable_parallel_tool_use": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "tool"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "disable_parallel_tool_use": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type",
                  "name"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "none"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              }
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    },
                    "input_schema": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "input_schema"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "bash"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "bash_20250124"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "str_replace_editor"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text_editor_20250124"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "str_replace_based_edit_tool"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text_editor_20250429"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "str_replace_based_edit_tool"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text_editor_20250728"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    },
                    "max_characters": {
                      "nullable": true,
                      "type": "number"
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "web_search"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "web_search_20250305"
                      ]
                    },
                    "allowed_domains": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "blocked_domains": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cache_control": {
                      "nullable": true
                    },
                    "max_uses": {
                      "nullable": true,
                      "type": "number"
                    },
                    "user_location": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ]
                }
              ]
            }
          },
          "top_k": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          }
        },
        "required": [
          "model",
          "messages",
          "max_tokens"
        ]
      },
      "AnthropicMessagesResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "citations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    }
                  },
                  "required": [
                    "citations",
                    "text",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "input": {},
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "tool_use"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "input",
                    "name",
                    "type"
                  ]
                }
              ]
            }
          },
          "model": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "assistant"
            ]
          },
          "stop_reason": {
            "nullable": true
          },
          "stop_sequence": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "message"
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "input_tokens": {
                "type": "number"
              },
              "output_tokens": {
                "type": "number"
              },
              "cache_read_input_tokens": {
                "nullable": true,
                "type": "number"
              },
              "cache_creation_input_tokens": {
                "nullable": true,
                "type": "number"
              },
              "cache_creation": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "ephemeral_1h_input_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "ephemeral_5m_input_tokens": {
                    "nullable": true,
                    "type": "number"
                  }
                }
              }
            },
            "required": [
              "input_tokens",
              "output_tokens"
            ]
          }
        },
        "required": [
          "id",
          "content",
          "model",
          "role",
          "type",
          "usage"
        ]
      },
      "CerebrasChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "CerebrasChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ]
      },
      "CohereChatRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ]
                              }
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "tool_result"
                                    ]
                                  },
                                  "tool_call_id": {
                                    "type": "string"
                                  },
                                  "content": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "tool_call_id",
                                  "content"
                                ]
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "arguments"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "function"
                        ]
                      }
                    }
                  },
                  "required": [
                    "role"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "content": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "tool_call_id",
                    "content"
                  ]
                }
              ]
            }
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number"
          },
          "max_tokens": {
            "type": "number"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "function"
                  ]
                },
                "function": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "required": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "type"
                      ]
                    }
                  },
                  "required": [
                    "name"
                  ]
                }
              },
              "required": [
                "type",
                "function"
              ]
            }
          },
          "tool_choice": {
            "type": "string",
            "enum": [
              "REQUIRED",
              "NONE"
            ]
          },
          "safety_mode": {
            "type": "string",
            "enum": [
              "CONTEXTUAL",
              "STRICT",
              "OFF"
            ]
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "json_object",
                  "text"
                ]
              },
              "json_schema": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "type"
            ]
          },
          "frequency_penalty": {
            "type": "number"
          },
          "presence_penalty": {
            "type": "number"
          },
          "k": {
            "type": "number"
          },
          "p": {
            "type": "number"
          },
          "seed": {
            "type": "number"
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "logprobs": {
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "CohereChatResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "message": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string",
                "enum": [
                  "assistant"
                ]
              },
              "content": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "text"
                          ]
                        },
                        "text": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "text"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "tool_result"
                          ]
                        },
                        "tool_call_id": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "tool_call_id",
                        "content"
                      ]
                    }
                  ]
                }
              },
              "tool_calls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "arguments"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "function"
                  ]
                }
              }
            },
            "required": [
              "role"
            ]
          },
          "finish_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "COMPLETE",
                  "MAX_TOKENS",
                  "STOP_SEQUENCE",
                  "TOOL_CALL",
                  "ERROR"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "billed_units": {
                "type": "object",
                "properties": {
                  "input_tokens": {
                    "type": "number"
                  },
                  "output_tokens": {
                    "type": "number"
                  }
                }
              },
              "tokens": {
                "type": "object",
                "properties": {
                  "input_tokens": {
                    "type": "number"
                  },
                  "output_tokens": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "required": [
          "id",
          "message",
          "finish_reason"
        ]
      },
      "MistralChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "MistralChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "PerplexityChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "stream_mode": {
            "type": "string",
            "enum": [
              "full",
              "concise"
            ]
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "PerplexityChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "GroqChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "GroqChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "OpenrouterChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "json_object",
                  "json_schema"
                ]
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": {}
          },
          "reasoning": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "effort": {
                "type": "string"
              },
              "max_tokens": {
                "type": "integer",
                "exclusiveMinimum": true,
                "maximum": 9007199254740991
              },
              "exclude": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "OpenrouterChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "VllmChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "A text content part"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "A developer message"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "A text content part"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "A system message"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "A text content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "Image URL details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "An image content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "Audio input details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "An audio content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "File details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "A file content part"
                              }
                            ],
                            "description": "A content part in a message"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "A user message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "A text content part"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "A refusal content part"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "Function call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "A function tool call in the message"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "Custom tool call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "A custom tool call in the message"
                          }
                        ],
                        "description": "A tool call in the assistant message"
                      }
                    },
                    "reasoning": {
                      "nullable": true,
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "An assistant message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "A text content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "Image URL details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "An image content part"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "A tool result message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "A function result message (deprecated)"
                }
              ],
              "description": "A message in the conversation"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "A function definition for tool calling"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "A function tool definition"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool"
                        },
                        "description": {
                          "description": "Description of the tool",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "A custom tool definition"
                }
              ],
              "description": "A tool definition"
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model.\n    auto: allows the model to pick from allowed tools or generate a message.\n    required: requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "A function definition for tool calling"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "A function tool definition"
                          }
                        }
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "Allowed tools configuration"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "Allowed tool choice configuration"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "Named function tool choice"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool"
                      },
                      "description": {
                        "description": "Description of the tool",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format"
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "A custom tool definition"
              }
            ],
            "description": "Tool choice option"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "top_p": {
            "nullable": true,
            "type": "number"
          },
          "top_k": {
            "nullable": true,
            "type": "number"
          },
          "frequency_penalty": {
            "nullable": true,
            "type": "number"
          },
          "presence_penalty": {
            "nullable": true,
            "type": "number"
          },
          "repetition_penalty": {
            "nullable": true,
            "type": "number"
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "seed": {
            "nullable": true,
            "type": "number"
          },
          "n": {
            "nullable": true,
            "type": "number"
          },
          "best_of": {
            "nullable": true,
            "type": "number"
          },
          "logprobs": {
            "nullable": true,
            "type": "boolean"
          },
          "top_logprobs": {
            "nullable": true,
            "type": "number"
          },
          "chat_template_kwargs": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "VllmChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "Function call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "A function tool call in the message"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "Custom tool call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "A custom tool call in the message"
                          }
                        ],
                        "description": "A tool call in the assistant message"
                      }
                    },
                    "reasoning": {
                      "nullable": true,
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "The assistant message in the response"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "A choice in the chat completion response"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {},
              "prompt_tokens_details": {}
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "Token usage statistics for the completion"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ]
      },
      "OllamaChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "A text content part"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "A developer message"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "A text content part"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "A system message"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "A text content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "Image URL details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "An image content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "Audio input details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "An audio content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "File details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "A file content part"
                              }
                            ],
                            "description": "A content part in a message"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "A user message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "A text content part"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "A refusal content part"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "Function call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "A function tool call in the message"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "Custom tool call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "A custom tool call in the message"
                          }
                        ],
                        "description": "A tool call in the assistant message"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "An assistant message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "A text content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "Image URL details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "An image content part"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "A tool result message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "A function result message (deprecated)"
                }
              ],
              "description": "A message in the conversation"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "A function definition for tool calling"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "A function tool definition"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool"
                        },
                        "description": {
                          "description": "Description of the tool",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "A custom tool definition"
                }
              ],
              "description": "A tool definition"
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model.\n    auto: allows the model to pick from allowed tools or generate a message.\n    required: requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "A function definition for tool calling"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "A function tool definition"
                          }
                        }
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "Allowed tools configuration"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "Allowed tool choice configuration"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "Named function tool choice"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool"
                      },
                      "description": {
                        "description": "Description of the tool",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format"
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ]
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "A custom tool definition"
              }
            ],
            "description": "Tool choice option"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "top_p": {
            "nullable": true,
            "type": "number"
          },
          "frequency_penalty": {
            "nullable": true,
            "type": "number"
          },
          "presence_penalty": {
            "nullable": true,
            "type": "number"
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "seed": {
            "nullable": true,
            "type": "number"
          },
          "n": {
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "OllamaChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "Function call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "A function tool call in the message"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "Custom tool call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "A custom tool call in the message"
                          }
                        ],
                        "description": "A tool call in the assistant message"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "The assistant message in the response"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "A choice in the chat completion response"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {},
              "prompt_tokens_details": {}
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "Token usage statistics for the completion"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ]
      },
      "OllamaNativeChatRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string"
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "thinking": {
                  "type": "string"
                },
                "images": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tool_calls": {
                  "nullable": true,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "function": {
                        "type": "object",
                        "properties": {
                          "index": {
                            "type": "number"
                          },
                          "name": {
                            "type": "string"
                          },
                          "arguments": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "arguments"
                        ],
                        "additionalProperties": {}
                      }
                    },
                    "required": [
                      "function"
                    ],
                    "additionalProperties": {}
                  }
                },
                "tool_name": {
                  "type": "string"
                },
                "tool_call_id": {
                  "type": "string"
                }
              },
              "required": [
                "role"
              ],
              "additionalProperties": {}
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "function": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": {}
                }
              },
              "required": [
                "type",
                "function"
              ],
              "additionalProperties": {}
            }
          },
          "format": {},
          "options": {
            "type": "object",
            "properties": {
              "temperature": {
                "type": "number"
              },
              "top_k": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "top_p": {
                "type": "number"
              },
              "min_p": {
                "type": "number"
              },
              "typical_p": {
                "type": "number"
              },
              "seed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "repeat_penalty": {
                "type": "number"
              },
              "repeat_last_n": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "presence_penalty": {
                "type": "number"
              },
              "frequency_penalty": {
                "type": "number"
              },
              "stop": {
                "maxItems": 16,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256
                }
              },
              "num_keep": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "num_ctx": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              "num_predict": {
                "type": "integer",
                "minimum": -2,
                "maximum": 9007199254740991
              }
            }
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "keep_alive": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "think": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              }
            ]
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "top_p": {
            "nullable": true,
            "type": "number"
          },
          "max_output_tokens": {
            "nullable": true,
            "type": "number"
          },
          "truncate": {
            "type": "boolean"
          },
          "shift": {
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": {}
      },
      "OllamaNativeChatResponseInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "message": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "content": {
                "type": "string"
              },
              "thinking": {
                "type": "string"
              },
              "tool_calls": {
                "nullable": true,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "index": {
                          "type": "number"
                        },
                        "name": {
                          "type": "string"
                        },
                        "arguments": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "arguments"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "function"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "role"
            ],
            "additionalProperties": {}
          },
          "done": {
            "type": "boolean"
          },
          "done_reason": {
            "type": "string"
          },
          "total_duration": {
            "type": "number"
          },
          "load_duration": {
            "type": "number"
          },
          "prompt_eval_count": {
            "type": "number"
          },
          "prompt_eval_duration": {
            "type": "number"
          },
          "eval_count": {
            "type": "number"
          },
          "eval_duration": {
            "type": "number"
          }
        },
        "required": [
          "model",
          "message",
          "done"
        ],
        "additionalProperties": {}
      },
      "ZhipuaiChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "content": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                              }
                            ],
                            "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                          }
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                          }
                        ],
                        "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                      }
                    },
                    "function_call": {
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "type": "string"
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                }
              ],
              "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://docs.z.ai/api-reference/llm/chat-completion#body\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://docs.z.ai/api-reference/llm/chat-completion#body\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://docs.z.ai/api-reference/llm/chat-completion#body\n  "
              }
            ],
            "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
          },
          "request_id": {
            "type": "string"
          },
          "do_sample": {
            "type": "boolean"
          },
          "stream": {
            "type": "boolean"
          },
          "thinking": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ]
              },
              "clear_thinking": {
                "type": "boolean"
              }
            },
            "required": [
              "type"
            ]
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "top_p": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "tool_stream": {
            "type": "boolean"
          },
          "stop": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "json_object"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "ZhipuaiChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "sensitive",
                        "network_error"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "reasoning_content": {
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                          }
                        ],
                        "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                      }
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "prompt_tokens_details": {
                "description": "https://docs.z.ai/api-reference/llm/chat-completion#response",
                "type": "object",
                "properties": {
                  "cached_tokens": {
                    "type": "number"
                  }
                },
                "required": [
                  "cached_tokens"
                ]
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
          },
          "web_search": {
            "description": "https://docs.z.ai/api-reference/llm/chat-completion#response",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                },
                "link": {
                  "type": "string"
                },
                "media": {
                  "type": "string"
                },
                "icon": {
                  "type": "string"
                },
                "refer": {
                  "type": "string"
                },
                "publish_date": {
                  "type": "string"
                }
              },
              "required": [
                "title",
                "content",
                "link",
                "media",
                "icon",
                "refer",
                "publish_date"
              ]
            }
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ]
      },
      "DeepSeekChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": {}
      },
      "DeepSeekChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "ArchestraChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": {}
      },
      "ArchestraChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "MinimaxChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    },
                    "reasoning_details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "text"
                        ]
                      }
                    }
                  },
                  "required": [
                    "role"
                  ]
                },
                {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "developer"
                          ]
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "system"
                          ]
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image_url"
                                        ]
                                      },
                                      "image_url": {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          },
                                          "detail": {
                                            "type": "string",
                                            "enum": [
                                              "auto",
                                              "low",
                                              "high"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "image_url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_audio"
                                        ]
                                      },
                                      "input_audio": {
                                        "type": "object",
                                        "properties": {
                                          "data": {
                                            "type": "string"
                                          },
                                          "format": {
                                            "type": "string",
                                            "enum": [
                                              "wav",
                                              "mp3"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "data",
                                          "format"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "input_audio"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "file"
                                        ]
                                      },
                                      "file": {
                                        "type": "object",
                                        "properties": {
                                          "file_data": {
                                            "type": "string"
                                          },
                                          "file_id": {
                                            "type": "string"
                                          },
                                          "filename": {
                                            "type": "string"
                                          }
                                        },
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "file"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                  }
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "user"
                          ]
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "assistant"
                          ]
                        },
                        "audio": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        },
                        "content": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "refusal"
                                    ]
                                  },
                                  "refusal": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "refusal"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                              }
                            }
                          ]
                        },
                        "function_call": {
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "arguments": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "arguments",
                            "name"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "reasoning_content": {
                          "nullable": true,
                          "type": "string"
                        },
                        "refusal": {
                          "nullable": true,
                          "type": "string"
                        },
                        "tool_calls": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "function"
                                    ]
                                  },
                                  "function": {
                                    "type": "object",
                                    "properties": {
                                      "arguments": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "arguments",
                                      "name"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "function"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "custom"
                                    ]
                                  },
                                  "custom": {
                                    "type": "object",
                                    "properties": {
                                      "input": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "input",
                                      "name"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "custom"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                          }
                        }
                      },
                      "required": [
                        "role"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "tool"
                          ]
                        },
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image_url"
                                        ]
                                      },
                                      "image_url": {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          },
                                          "detail": {
                                            "type": "string",
                                            "enum": [
                                              "auto",
                                              "low",
                                              "high"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "image_url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "tool_call_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content",
                        "tool_call_id"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "function"
                          ]
                        },
                        "content": {
                          "nullable": true,
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content",
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                    }
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                }
              ]
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "nullable": true,
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "top_p": {
            "nullable": true,
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "n": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "json_object"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          "user": {
            "type": "string"
          },
          "reasoning_split": {
            "type": "boolean"
          },
          "thinking": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          "extra_body": {
            "type": "object",
            "properties": {
              "reasoning_split": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "MinimaxChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "reasoning_details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "text"
                        ]
                      }
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://platform.minimax.io/docs/api-reference/text-openai-api#response"
                }
              },
              "required": [
                "finish_reason",
                "message"
              ],
              "description": "https://platform.minimax.io/docs/api-reference/text-openai-api#response"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "type": "object",
                "properties": {
                  "reasoning_tokens": {
                    "type": "number"
                  }
                }
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://platform.minimax.io/docs/api-reference/text-openai-api#usage"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ]
      },
      "XaiChatCompletionRequestInput": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "XaiChatCompletionResponseInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ]
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "UserConfigFieldDefaultInput": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        ]
      },
      "UserConfigFieldInput": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "boolean",
              "directory",
              "file"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "promptOnInstallation": {
            "type": "boolean"
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserConfigFieldDefaultInput"
              }
            ]
          },
          "multiple": {
            "type": "boolean"
          },
          "sensitive": {
            "type": "boolean"
          },
          "min": {
            "type": "number"
          },
          "max": {
            "type": "number"
          },
          "headerName": {
            "type": "string"
          },
          "valuePrefix": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "description"
        ]
      },
      "TextSearchLanguage": {
        "type": "string",
        "enum": [
          "simple",
          "arabic",
          "armenian",
          "basque",
          "catalan",
          "danish",
          "dutch",
          "english",
          "finnish",
          "french",
          "german",
          "greek",
          "hindi",
          "hungarian",
          "indonesian",
          "irish",
          "italian",
          "lithuanian",
          "nepali",
          "norwegian",
          "portuguese",
          "romanian",
          "russian",
          "serbian",
          "spanish",
          "swedish",
          "tamil",
          "turkish",
          "yiddish"
        ]
      },
      "EmbeddingDimensions": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991,
        "enum": [
          3072,
          1536,
          1024,
          768,
          384
        ]
      },
      "LocalConfigEnvironmentDefault": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      },
      "OpenAiChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "OpenAiChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": false
      },
      "GeminiGenerateContentRequest": {
        "type": "object",
        "properties": {
          "contents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "description": "The role of the author of this content."
                },
                "parts": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "text"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "inlineData": {
                                "type": "object",
                                "properties": {
                                  "mimeType": {
                                    "type": "string"
                                  },
                                  "data": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "data"
                                ],
                                "additionalProperties": false
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "inlineData"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "functionCall": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "args": {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "functionCall"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "functionResponse": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "response": {
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "willContinue": {
                                    "type": "boolean"
                                  },
                                  "scheduling": {
                                    "type": "string",
                                    "enum": [
                                      "SCHEDULING_UNSPECIFIED",
                                      "SILENT",
                                      "WHEN_IDLE",
                                      "INTERRUPT"
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "response"
                                ],
                                "additionalProperties": false
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "functionResponse"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "fileData": {
                                "type": "object",
                                "properties": {
                                  "mimeType": {
                                    "type": "string"
                                  },
                                  "fileUri": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "fileUri"
                                ],
                                "additionalProperties": false
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "fileData"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "language": {
                                "type": "string",
                                "enum": [
                                  "LANGUAGE_UNSPECIFIED",
                                  "PYTHON"
                                ]
                              },
                              "executableCode": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code"
                                ],
                                "additionalProperties": false
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "language",
                              "executableCode"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "thought": {
                                "description": "Indicates if the part is thought from the model",
                                "type": "boolean"
                              },
                              "thoughtSignature": {
                                "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                "type": "string"
                              },
                              "codeExecutionResult": {
                                "type": "object",
                                "properties": {
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "OUTCOME_UNSPECIFIED",
                                      "OUTCOME_OK",
                                      "OUTCOME_FAILED",
                                      "OUTCOME_DEADLINE_EXCEEDED"
                                    ],
                                    "description": "Outcome of the code execution."
                                  },
                                  "output": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "outcome"
                                ],
                                "additionalProperties": false
                              },
                              "metadata": {
                                "description": "https://ai.google.dev/api/caching#PartMetadata",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "startOffset": {
                                        "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "endOffset": {
                                        "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                        "type": "string"
                                      },
                                      "fps": {
                                        "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                        "type": "number"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "codeExecutionResult"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    ],
                    "description": "https://ai.google.dev/api/caching#Part"
                  }
                }
              },
              "required": [
                "role",
                "parts"
              ],
              "additionalProperties": false,
              "description": "\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"
            },
            "description": "The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request"
          },
          "tools": {
            "description": "A list of Tools the Model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the Model. Supported Tools are Function and codeExecution. Refer to the Function calling and the Code execution guides to learn more.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "functionDeclarations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63."
                          },
                          "description": {
                            "type": "string",
                            "description": "A brief description of the function."
                          },
                          "behavior": {
                            "description": "https://ai.google.dev/api/caching#Behavior",
                            "type": "string",
                            "enum": [
                              "UNSPECIFIED",
                              "BLOCKING",
                              "NON_BLOCKING"
                            ]
                          },
                          "parameters": {
                            "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "parametersJsonSchema": {},
                          "response": {},
                          "responseJsonSchema": {}
                        },
                        "required": [
                          "name",
                          "description"
                        ],
                        "additionalProperties": false,
                        "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                      }
                    },
                    "googleSearchRetrieval": {
                      "type": "object",
                      "properties": {
                        "dynamicRetrievalConfig": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "MODE_UNSPECIFIED",
                                "MODE_DYNAMIC"
                              ],
                              "description": "https://ai.google.dev/api/caching#Mode"
                            },
                            "dynamicThreshold": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "mode",
                            "dynamicThreshold"
                          ],
                          "additionalProperties": false,
                          "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                        }
                      },
                      "required": [
                        "dynamicRetrievalConfig"
                      ],
                      "additionalProperties": false,
                      "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                    },
                    "codeExecution": {},
                    "googleSearch": {},
                    "urlContext": {}
                  },
                  "additionalProperties": false,
                  "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
                }
              },
              {
                "type": "object",
                "properties": {
                  "functionDeclarations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63."
                        },
                        "description": {
                          "type": "string",
                          "description": "A brief description of the function."
                        },
                        "behavior": {
                          "description": "https://ai.google.dev/api/caching#Behavior",
                          "type": "string",
                          "enum": [
                            "UNSPECIFIED",
                            "BLOCKING",
                            "NON_BLOCKING"
                          ]
                        },
                        "parameters": {
                          "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "parametersJsonSchema": {},
                        "response": {},
                        "responseJsonSchema": {}
                      },
                      "required": [
                        "name",
                        "description"
                      ],
                      "additionalProperties": false,
                      "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                    }
                  },
                  "googleSearchRetrieval": {
                    "type": "object",
                    "properties": {
                      "dynamicRetrievalConfig": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "MODE_UNSPECIFIED",
                              "MODE_DYNAMIC"
                            ],
                            "description": "https://ai.google.dev/api/caching#Mode"
                          },
                          "dynamicThreshold": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "mode",
                          "dynamicThreshold"
                        ],
                        "additionalProperties": false,
                        "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                      }
                    },
                    "required": [
                      "dynamicRetrievalConfig"
                    ],
                    "additionalProperties": false,
                    "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                  },
                  "codeExecution": {},
                  "googleSearch": {},
                  "urlContext": {}
                },
                "additionalProperties": false,
                "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
              }
            ]
          },
          "toolConfig": {
            "description": "Tool configuration for any Tool specified in the request.",
            "type": "object",
            "properties": {
              "functionCallingConfig": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "AUTO",
                      "ANY",
                      "NONE"
                    ]
                  },
                  "allowedFunctionNames": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "functionCallingConfig"
            ],
            "additionalProperties": false
          },
          "safetySettings": {
            "description": "A list of unique SafetySetting instances for blocking unsafe content.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "enum": [
                    "HARM_CATEGORY_UNSPECIFIED",
                    "HARM_CATEGORY_DEROGATORY",
                    "HARM_CATEGORY_TOXICITY",
                    "HARM_CATEGORY_VIOLENCE",
                    "HARM_CATEGORY_SEXUAL",
                    "HARM_CATEGORY_MEDICAL",
                    "HARM_CATEGORY_DANGEROUS",
                    "HARM_CATEGORY_HARASSMENT",
                    "HARM_CATEGORY_HATE_SPEECH",
                    "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                    "HARM_CATEGORY_DANGEROUS_CONTENT",
                    "HARM_CATEGORY_CIVIC_INTEGRITY"
                  ],
                  "description": "\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"
                },
                "threshold": {
                  "type": "string",
                  "enum": [
                    "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
                    "BLOCK_LOW_AND_ABOVE",
                    "BLOCK_MEDIUM_AND_ABOVE",
                    "BLOCK_ONLY_HIGH",
                    "BLOCK_NONE",
                    "OFF"
                  ],
                  "description": "\n      Controls the probability threshold at which harm is blocked.\n\n      https://ai.google.dev/api/generate-content#HarmBlockThreshold\n      "
                }
              },
              "required": [
                "category",
                "threshold"
              ],
              "additionalProperties": false,
              "description": "https://ai.google.dev/api/generate-content#v1beta.SafetySetting"
            }
          },
          "systemInstruction": {
            "type": "object",
            "properties": {
              "parts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "parts"
            ],
            "additionalProperties": false,
            "description": "Developer set system instruction(s). Currently, text only."
          },
          "generationConfig": {
            "type": "object",
            "properties": {
              "stopSequences": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "responseMimeType": {
                "type": "string"
              },
              "responseSchema": {},
              "_responseJsonSchema": {},
              "responseJsonSchema": {},
              "responseModalities": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "MODALITY_UNSPECIFIED",
                    "TEXT",
                    "IMAGE",
                    "AUDIO"
                  ],
                  "description": "https://ai.google.dev/api/generate-content#Modality"
                }
              },
              "candidateCount": {
                "type": "number"
              },
              "maxOutputTokens": {
                "type": "number"
              },
              "temperature": {
                "type": "number"
              },
              "topP": {
                "type": "number"
              },
              "topK": {
                "type": "number"
              },
              "seed": {
                "type": "number"
              },
              "presencePenalty": {
                "type": "number"
              },
              "frequencyPenalty": {
                "type": "number"
              },
              "responseLogprobs": {
                "type": "boolean"
              },
              "logProbs": {
                "type": "number"
              },
              "enableEnhancedCivicAnswers": {
                "type": "boolean"
              },
              "speechConfig": {},
              "thinkingConfig": {},
              "imageConfig": {},
              "mediaResolution": {
                "description": "https://ai.google.dev/api/generate-content#MediaResolution",
                "type": "string",
                "enum": [
                  "MEDIA_RESOLUTION_UNSPECIFIED",
                  "MEDIA_RESOLUTION_LOW",
                  "MEDIA_RESOLUTION_MEDIUM",
                  "MEDIA_RESOLUTION_HIGH"
                ]
              }
            },
            "additionalProperties": false,
            "description": "https://ai.google.dev/api/generate-content#v1beta.GenerationConfig"
          },
          "cachedContent": {
            "description": "The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}",
            "type": "string"
          },
          "config": {
            "type": "object",
            "properties": {
              "tools": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "functionDeclarations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63."
                              },
                              "description": {
                                "type": "string",
                                "description": "A brief description of the function."
                              },
                              "behavior": {
                                "description": "https://ai.google.dev/api/caching#Behavior",
                                "type": "string",
                                "enum": [
                                  "UNSPECIFIED",
                                  "BLOCKING",
                                  "NON_BLOCKING"
                                ]
                              },
                              "parameters": {
                                "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                                "type": "object",
                                "additionalProperties": {}
                              },
                              "parametersJsonSchema": {},
                              "response": {},
                              "responseJsonSchema": {}
                            },
                            "required": [
                              "name",
                              "description"
                            ],
                            "additionalProperties": false,
                            "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                          }
                        },
                        "googleSearchRetrieval": {
                          "type": "object",
                          "properties": {
                            "dynamicRetrievalConfig": {
                              "type": "object",
                              "properties": {
                                "mode": {
                                  "type": "string",
                                  "enum": [
                                    "MODE_UNSPECIFIED",
                                    "MODE_DYNAMIC"
                                  ],
                                  "description": "https://ai.google.dev/api/caching#Mode"
                                },
                                "dynamicThreshold": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "mode",
                                "dynamicThreshold"
                              ],
                              "additionalProperties": false,
                              "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                            }
                          },
                          "required": [
                            "dynamicRetrievalConfig"
                          ],
                          "additionalProperties": false,
                          "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                        },
                        "codeExecution": {},
                        "googleSearch": {},
                        "urlContext": {}
                      },
                      "additionalProperties": false,
                      "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "functionDeclarations": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63."
                            },
                            "description": {
                              "type": "string",
                              "description": "A brief description of the function."
                            },
                            "behavior": {
                              "description": "https://ai.google.dev/api/caching#Behavior",
                              "type": "string",
                              "enum": [
                                "UNSPECIFIED",
                                "BLOCKING",
                                "NON_BLOCKING"
                              ]
                            },
                            "parameters": {
                              "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "parametersJsonSchema": {},
                            "response": {},
                            "responseJsonSchema": {}
                          },
                          "required": [
                            "name",
                            "description"
                          ],
                          "additionalProperties": false,
                          "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                        }
                      },
                      "googleSearchRetrieval": {
                        "type": "object",
                        "properties": {
                          "dynamicRetrievalConfig": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "MODE_UNSPECIFIED",
                                  "MODE_DYNAMIC"
                                ],
                                "description": "https://ai.google.dev/api/caching#Mode"
                              },
                              "dynamicThreshold": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "mode",
                              "dynamicThreshold"
                            ],
                            "additionalProperties": false,
                            "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                          }
                        },
                        "required": [
                          "dynamicRetrievalConfig"
                        ],
                        "additionalProperties": false,
                        "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                      },
                      "codeExecution": {},
                      "googleSearch": {},
                      "urlContext": {}
                    },
                    "additionalProperties": false,
                    "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
                  }
                ]
              },
              "toolConfig": {
                "description": "Tool configuration for any Tool specified in the request.",
                "type": "object",
                "properties": {
                  "functionCallingConfig": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "AUTO",
                          "ANY",
                          "NONE"
                        ]
                      },
                      "allowedFunctionNames": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "functionCallingConfig"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "contents"
        ],
        "additionalProperties": false
      },
      "GeminiGenerateContentResponse": {
        "type": "object",
        "properties": {
          "candidates": {
            "description": "Candidate responses from the model",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "content": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "description": "The role of the author of this content."
                    },
                    "parts": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": "string"
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "inlineData": {
                                    "type": "object",
                                    "properties": {
                                      "mimeType": {
                                        "type": "string"
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "data"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "inlineData"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "functionCall": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "args": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "functionCall"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "functionResponse": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "response": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "willContinue": {
                                        "type": "boolean"
                                      },
                                      "scheduling": {
                                        "type": "string",
                                        "enum": [
                                          "SCHEDULING_UNSPECIFIED",
                                          "SILENT",
                                          "WHEN_IDLE",
                                          "INTERRUPT"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "response"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "functionResponse"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "fileData": {
                                    "type": "object",
                                    "properties": {
                                      "mimeType": {
                                        "type": "string"
                                      },
                                      "fileUri": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "fileUri"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "fileData"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "language": {
                                    "type": "string",
                                    "enum": [
                                      "LANGUAGE_UNSPECIFIED",
                                      "PYTHON"
                                    ]
                                  },
                                  "executableCode": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "language",
                                  "executableCode"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "thought": {
                                    "description": "Indicates if the part is thought from the model",
                                    "type": "boolean"
                                  },
                                  "thoughtSignature": {
                                    "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                                    "type": "string"
                                  },
                                  "codeExecutionResult": {
                                    "type": "object",
                                    "properties": {
                                      "outcome": {
                                        "type": "string",
                                        "enum": [
                                          "OUTCOME_UNSPECIFIED",
                                          "OUTCOME_OK",
                                          "OUTCOME_FAILED",
                                          "OUTCOME_DEADLINE_EXCEEDED"
                                        ],
                                        "description": "Outcome of the code execution."
                                      },
                                      "output": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "outcome"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "metadata": {
                                    "description": "https://ai.google.dev/api/caching#PartMetadata",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "startOffset": {
                                            "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "endOffset": {
                                            "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                            "type": "string"
                                          },
                                          "fps": {
                                            "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "description": "https://ai.google.dev/api/caching#VideoMetadata"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "codeExecutionResult"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        ],
                        "description": "https://ai.google.dev/api/caching#Part"
                      }
                    }
                  },
                  "required": [
                    "role",
                    "parts"
                  ],
                  "additionalProperties": false,
                  "description": "\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"
                },
                "finishReason": {
                  "description": "\n  The reason why the model stopped generating tokens.\n\n  If empty, the model has not stopped generating tokens.\n\n  https://ai.google.dev/api/generate-content#FinishReason\n",
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FINISH_REASON_UNSPECIFIED",
                        "STOP",
                        "MAX_TOKENS",
                        "SAFETY",
                        "RECITATION",
                        "LANGUAGE",
                        "OTHER",
                        "BLOCKLIST",
                        "PROHIBITED_CONTENT",
                        "SPII",
                        "MALFORMED_FUNCTION_CALL",
                        "IMAGE_SAFETY",
                        "IMAGE_PROHIBITED_CONTENT",
                        "IMAGE_OTHER",
                        "NO_IMAGE",
                        "IMAGE_RECITATION",
                        "UNEXPECTED_TOOL_CALL",
                        "TOO_MANY_TOOL_CALLS"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "safetyRatings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "category": {
                        "type": "string",
                        "enum": [
                          "HARM_CATEGORY_UNSPECIFIED",
                          "HARM_CATEGORY_DEROGATORY",
                          "HARM_CATEGORY_TOXICITY",
                          "HARM_CATEGORY_VIOLENCE",
                          "HARM_CATEGORY_SEXUAL",
                          "HARM_CATEGORY_MEDICAL",
                          "HARM_CATEGORY_DANGEROUS",
                          "HARM_CATEGORY_HARASSMENT",
                          "HARM_CATEGORY_HATE_SPEECH",
                          "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                          "HARM_CATEGORY_DANGEROUS_CONTENT",
                          "HARM_CATEGORY_CIVIC_INTEGRITY"
                        ],
                        "description": "\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"
                      },
                      "probability": {
                        "type": "string",
                        "enum": [
                          "HARM_PROBABILITY_UNSPECIFIED",
                          "NEGLIGIBLE",
                          "LOW",
                          "MEDIUM",
                          "HIGH"
                        ],
                        "description": "https://ai.google.dev/api/generate-content#HarmProbability"
                      },
                      "blocked": {
                        "description": "Was this content blocked because of this rating?",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "category",
                      "probability"
                    ],
                    "additionalProperties": false,
                    "description": "https://ai.google.dev/api/generate-content#v1beta.SafetyRating"
                  }
                },
                "citationMetadata": {
                  "description": "https://ai.google.dev/api/generate-content#citationmetadata",
                  "type": "object",
                  "properties": {
                    "citationSources": {
                      "type": "array",
                      "items": {
                        "description": "https://ai.google.dev/api/generate-content#CitationSource",
                        "type": "object",
                        "properties": {
                          "startIndex": {
                            "type": "number"
                          },
                          "endIndex": {
                            "type": "number"
                          },
                          "uri": {
                            "type": "string"
                          },
                          "license": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "citationSources"
                  ],
                  "additionalProperties": false
                },
                "tokenCount": {
                  "type": "number"
                },
                "groundingAttributions": {
                  "type": "array",
                  "items": {}
                },
                "groundingMetadata": {},
                "avgLogprobs": {
                  "type": "number"
                },
                "logprobsResult": {},
                "urlContextMetadata": {},
                "index": {
                  "description": "Index of the candidate in the list of response candidates.",
                  "type": "number"
                },
                "finishMessage": {
                  "description": "Details the reason why the model stopped generating tokens. This is populated only when finishReason is set.",
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "description": "https://ai.google.dev/api/generate-content#candidate"
            }
          },
          "promptFeedback": {
            "description": "Returns the prompt's feedback related to the content filters",
            "type": "object",
            "properties": {
              "blockReason": {
                "description": "Specifies the reason why the prompt was blocked. https://ai.google.dev/api/generate-content#BlockReason",
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "BLOCK_REASON_UNSPECIFIED",
                      "SAFETY",
                      "OTHER",
                      "BLOCKLIST",
                      "PROHIBITED_CONTENT",
                      "IMAGE_SAFETY"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "safetyRatings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string",
                      "enum": [
                        "HARM_CATEGORY_UNSPECIFIED",
                        "HARM_CATEGORY_DEROGATORY",
                        "HARM_CATEGORY_TOXICITY",
                        "HARM_CATEGORY_VIOLENCE",
                        "HARM_CATEGORY_SEXUAL",
                        "HARM_CATEGORY_MEDICAL",
                        "HARM_CATEGORY_DANGEROUS",
                        "HARM_CATEGORY_HARASSMENT",
                        "HARM_CATEGORY_HATE_SPEECH",
                        "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                        "HARM_CATEGORY_DANGEROUS_CONTENT",
                        "HARM_CATEGORY_CIVIC_INTEGRITY"
                      ],
                      "description": "\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"
                    },
                    "probability": {
                      "type": "string",
                      "enum": [
                        "HARM_PROBABILITY_UNSPECIFIED",
                        "NEGLIGIBLE",
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#HarmProbability"
                    },
                    "blocked": {
                      "description": "Was this content blocked because of this rating?",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "category",
                    "probability"
                  ],
                  "additionalProperties": false,
                  "description": "https://ai.google.dev/api/generate-content#v1beta.SafetyRating"
                }
              }
            },
            "additionalProperties": false
          },
          "usageMetadata": {
            "description": "Metadata on the generation requests' token usage",
            "type": "object",
            "properties": {
              "promptTokenCount": {
                "type": "number"
              },
              "cachedContentTokenCount": {
                "type": "number"
              },
              "candidatesTokenCount": {
                "type": "number"
              },
              "toolUsePromptTokenCount": {
                "type": "number"
              },
              "thoughtsTokenCount": {
                "type": "number"
              },
              "totalTokenCount": {
                "type": "number"
              },
              "promptTokensDetails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "modality": {
                      "type": "string",
                      "enum": [
                        "MODALITY_UNSPECIFIED",
                        "TEXT",
                        "IMAGE",
                        "AUDIO"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#Modality"
                    },
                    "tokenCount": {
                      "type": "number",
                      "description": "Number of tokens"
                    }
                  },
                  "required": [
                    "modality",
                    "tokenCount"
                  ],
                  "additionalProperties": false,
                  "description": "https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"
                }
              },
              "cacheTokensDetails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "modality": {
                      "type": "string",
                      "enum": [
                        "MODALITY_UNSPECIFIED",
                        "TEXT",
                        "IMAGE",
                        "AUDIO"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#Modality"
                    },
                    "tokenCount": {
                      "type": "number",
                      "description": "Number of tokens"
                    }
                  },
                  "required": [
                    "modality",
                    "tokenCount"
                  ],
                  "additionalProperties": false,
                  "description": "https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"
                }
              },
              "candidatesTokensDetails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "modality": {
                      "type": "string",
                      "enum": [
                        "MODALITY_UNSPECIFIED",
                        "TEXT",
                        "IMAGE",
                        "AUDIO"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#Modality"
                    },
                    "tokenCount": {
                      "type": "number",
                      "description": "Number of tokens"
                    }
                  },
                  "required": [
                    "modality",
                    "tokenCount"
                  ],
                  "additionalProperties": false,
                  "description": "https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"
                }
              },
              "toolUsePromptTokensDetails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "modality": {
                      "type": "string",
                      "enum": [
                        "MODALITY_UNSPECIFIED",
                        "TEXT",
                        "IMAGE",
                        "AUDIO"
                      ],
                      "description": "https://ai.google.dev/api/generate-content#Modality"
                    },
                    "tokenCount": {
                      "type": "number",
                      "description": "Number of tokens"
                    }
                  },
                  "required": [
                    "modality",
                    "tokenCount"
                  ],
                  "additionalProperties": false,
                  "description": "https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount"
                }
              }
            },
            "additionalProperties": false
          },
          "modelVersion": {
            "description": "The model version used to generate the response.",
            "type": "string"
          },
          "responseId": {
            "description": "The unique response ID.",
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "AnthropicMessagesRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "content": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              },
                              "citations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              }
                            },
                            "required": [
                              "text",
                              "type"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "image"
                                ]
                              },
                              "source": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "base64"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string"
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "url"
                                        ]
                                      },
                                      "url": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              }
                            },
                            "required": [
                              "type",
                              "source"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "document"
                                ]
                              },
                              "source": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "base64"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "application/pdf"
                                        ]
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "media_type": {
                                        "type": "string",
                                        "enum": [
                                          "text/plain"
                                        ]
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "media_type",
                                      "data"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "url"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "content"
                                        ]
                                      },
                                      "content": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "array",
                                                      "items": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string"
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "title": {
                                "nullable": true,
                                "type": "string"
                              },
                              "context": {
                                "nullable": true,
                                "type": "string"
                              },
                              "citations": {
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "enabled": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "enabled"
                                ],
                                "additionalProperties": false
                              },
                              "cache_control": {
                                "nullable": true
                              }
                            },
                            "required": [
                              "type",
                              "source"
                            ],
                            "additionalProperties": false,
                            "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "thinking"
                                ]
                              },
                              "thinking": {
                                "type": "string"
                              },
                              "signature": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "thinking",
                              "signature"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "redacted_thinking"
                                ]
                              },
                              "data": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "data"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "input": {},
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "tool_use"
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              }
                            },
                            "required": [
                              "id",
                              "input",
                              "name",
                              "type"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "tool_use_id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "tool_result"
                                ]
                              },
                              "cache_control": {
                                "nullable": true
                              },
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "text": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "text"
                                              ]
                                            },
                                            "cache_control": {
                                              "nullable": true
                                            },
                                            "citations": {
                                              "nullable": true,
                                              "type": "array",
                                              "items": {}
                                            }
                                          },
                                          "required": [
                                            "text",
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "image"
                                              ]
                                            },
                                            "source": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "base64"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string"
                                                    },
                                                    "data": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "url"
                                                      ]
                                                    },
                                                    "url": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "url"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            "cache_control": {
                                              "nullable": true
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "source"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "document"
                                              ]
                                            },
                                            "source": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "base64"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "application/pdf"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "media_type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text/plain"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "media_type",
                                                    "data"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "url"
                                                      ]
                                                    },
                                                    "url": {
                                                      "type": "string",
                                                      "format": "uri"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "url"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "content"
                                                      ]
                                                    },
                                                    "content": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "text": {
                                                                    "type": "string"
                                                                  },
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "text"
                                                                    ]
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  },
                                                                  "citations": {
                                                                    "nullable": true,
                                                                    "type": "array",
                                                                    "items": {}
                                                                  }
                                                                },
                                                                "required": [
                                                                  "text",
                                                                  "type"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "image"
                                                                    ]
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "base64"
                                                                            ]
                                                                          },
                                                                          "media_type": {
                                                                            "type": "string"
                                                                          },
                                                                          "data": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "media_type",
                                                                          "data"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "url"
                                                                            ]
                                                                          },
                                                                          "url": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "url"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            },
                                            "title": {
                                              "nullable": true,
                                              "type": "string"
                                            },
                                            "context": {
                                              "nullable": true,
                                              "type": "string"
                                            },
                                            "citations": {
                                              "nullable": true,
                                              "type": "object",
                                              "properties": {
                                                "enabled": {
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "enabled"
                                              ],
                                              "additionalProperties": false
                                            },
                                            "cache_control": {
                                              "nullable": true
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "source"
                                          ],
                                          "additionalProperties": false,
                                          "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                        }
                                      ]
                                    }
                                  }
                                ]
                              },
                              "is_error": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "tool_use_id",
                              "type"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "search_result",
                                  "server_tool_use",
                                  "web_search_tool_result",
                                  "web_fetch_tool_result",
                                  "code_execution_tool_result",
                                  "bash_code_execution_tool_result",
                                  "text_editor_code_execution_tool_result",
                                  "tool_search_tool_result",
                                  "container_upload"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    }
                  ]
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system"
                  ]
                }
              },
              "required": [
                "content",
                "role"
              ],
              "additionalProperties": false
            }
          },
          "max_tokens": {
            "type": "number"
          },
          "container": {
            "nullable": true,
            "type": "string"
          },
          "context_management": {
            "nullable": true,
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "mcp_servers": {
            "type": "array",
            "items": {}
          },
          "metadata": {
            "type": "object",
            "properties": {
              "user_id": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "user_id"
            ],
            "additionalProperties": false
          },
          "output_config": {
            "type": "object",
            "properties": {
              "effort": {
                "nullable": true,
                "type": "string"
              },
              "format": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "json_schema"
                    ]
                  },
                  "schema": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "type",
                  "schema"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "service_tier": {},
          "speed": {
            "type": "string",
            "enum": [
              "fast",
              "standard"
            ]
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stream": {
            "type": "boolean"
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "text"
                    ]
                  },
                  "text": {
                    "type": "string"
                  },
                  "cache_control": {
                    "nullable": true
                  },
                  "citations": {
                    "nullable": true,
                    "type": "array",
                    "items": {}
                  }
                },
                "required": [
                  "type",
                  "text"
                ],
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "cache_control": {
                      "nullable": true
                    },
                    "citations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "additionalProperties": false
                }
              }
            ]
          },
          "temperature": {
            "type": "number"
          },
          "thinking": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "budget_tokens": {
                    "type": "number"
                  },
                  "display": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "summarized",
                      "omitted"
                    ]
                  }
                },
                "required": [
                  "type",
                  "budget_tokens"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "adaptive"
                    ]
                  },
                  "display": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "summarized",
                      "omitted"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              }
            ]
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "auto"
                    ]
                  },
                  "disable_parallel_tool_use": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "any"
                    ]
                  },
                  "disable_parallel_tool_use": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "tool"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "disable_parallel_tool_use": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "type",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "none"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              }
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    },
                    "input_schema": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "input_schema"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "bash"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "bash_20250124"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "str_replace_editor"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text_editor_20250124"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "str_replace_based_edit_tool"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text_editor_20250429"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "str_replace_based_edit_tool"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text_editor_20250728"
                      ]
                    },
                    "cache_control": {
                      "nullable": true
                    },
                    "max_characters": {
                      "nullable": true,
                      "type": "number"
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "enum": [
                        "web_search"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "web_search_20250305"
                      ]
                    },
                    "allowed_domains": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "blocked_domains": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cache_control": {
                      "nullable": true
                    },
                    "max_uses": {
                      "nullable": true,
                      "type": "number"
                    },
                    "user_location": {
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "type"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "top_k": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          }
        },
        "required": [
          "model",
          "messages",
          "max_tokens"
        ],
        "additionalProperties": false
      },
      "AnthropicMessagesResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "citations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    }
                  },
                  "required": [
                    "citations",
                    "text",
                    "type"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "input": {},
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "tool_use"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "input",
                    "name",
                    "type"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "model": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "assistant"
            ]
          },
          "stop_reason": {
            "nullable": true
          },
          "stop_sequence": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "message"
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "input_tokens": {
                "type": "number"
              },
              "output_tokens": {
                "type": "number"
              },
              "cache_read_input_tokens": {
                "nullable": true,
                "type": "number"
              },
              "cache_creation_input_tokens": {
                "nullable": true,
                "type": "number"
              },
              "cache_creation": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "ephemeral_1h_input_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "ephemeral_5m_input_tokens": {
                    "nullable": true,
                    "type": "number"
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "input_tokens",
              "output_tokens"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "content",
          "model",
          "role",
          "type",
          "usage"
        ],
        "additionalProperties": false
      },
      "CerebrasChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "CerebrasChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/Cerebras/cerebras-cloud-sdk-node/blob/main/src/resources/chat/completions.ts"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": false
      },
      "CohereChatRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "tool_result"
                                    ]
                                  },
                                  "tool_call_id": {
                                    "type": "string"
                                  },
                                  "content": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "tool_call_id",
                                  "content"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "function"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "content": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "tool_call_id",
                    "content"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number"
          },
          "max_tokens": {
            "type": "number"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "function"
                  ]
                },
                "function": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "required": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "properties": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "type",
                "function"
              ],
              "additionalProperties": false
            }
          },
          "tool_choice": {
            "type": "string",
            "enum": [
              "REQUIRED",
              "NONE"
            ]
          },
          "safety_mode": {
            "type": "string",
            "enum": [
              "CONTEXTUAL",
              "STRICT",
              "OFF"
            ]
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "json_object",
                  "text"
                ]
              },
              "json_schema": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          "frequency_penalty": {
            "type": "number"
          },
          "presence_penalty": {
            "type": "number"
          },
          "k": {
            "type": "number"
          },
          "p": {
            "type": "number"
          },
          "seed": {
            "type": "number"
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "logprobs": {
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "CohereChatResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "message": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string",
                "enum": [
                  "assistant"
                ]
              },
              "content": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "text"
                          ]
                        },
                        "text": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "text"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "tool_result"
                          ]
                        },
                        "tool_call_id": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "tool_call_id",
                        "content"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "tool_calls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "arguments"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "function"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "role"
            ],
            "additionalProperties": false
          },
          "finish_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "COMPLETE",
                  "MAX_TOKENS",
                  "STOP_SEQUENCE",
                  "TOOL_CALL",
                  "ERROR"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "billed_units": {
                "type": "object",
                "properties": {
                  "input_tokens": {
                    "type": "number"
                  },
                  "output_tokens": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              },
              "tokens": {
                "type": "object",
                "properties": {
                  "input_tokens": {
                    "type": "number"
                  },
                  "output_tokens": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "message",
          "finish_reason"
        ],
        "additionalProperties": false
      },
      "MistralChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "MistralChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "PerplexityChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "stream_mode": {
            "type": "string",
            "enum": [
              "full",
              "concise"
            ]
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "PerplexityChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "GroqChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "GroqChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "OpenrouterChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "json_object",
                  "json_schema"
                ]
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": {}
          },
          "reasoning": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "effort": {
                "type": "string"
              },
              "max_tokens": {
                "type": "integer",
                "exclusiveMinimum": true,
                "maximum": 9007199254740991
              },
              "exclude": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "OpenrouterChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "VllmChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "A text content part"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "A developer message"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "A text content part"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "A system message"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "A text content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "Image URL details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "An image content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "Audio input details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "An audio content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "File details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "A file content part"
                              }
                            ],
                            "description": "A content part in a message"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "A user message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "A text content part"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "A refusal content part"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "Function call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "A function tool call in the message"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "Custom tool call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "A custom tool call in the message"
                          }
                        ],
                        "description": "A tool call in the assistant message"
                      }
                    },
                    "reasoning": {
                      "nullable": true,
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "An assistant message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "A text content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "Image URL details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "An image content part"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "A tool result message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "A function result message (deprecated)"
                }
              ],
              "description": "A message in the conversation"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "A function definition for tool calling"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "A function tool definition"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool"
                        },
                        "description": {
                          "description": "Description of the tool",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "A custom tool definition"
                }
              ],
              "description": "A tool definition"
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model.\n    auto: allows the model to pick from allowed tools or generate a message.\n    required: requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "A function definition for tool calling"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "A function tool definition"
                          }
                        }
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "Allowed tools configuration"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "Allowed tool choice configuration"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "Named function tool choice"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool"
                      },
                      "description": {
                        "description": "Description of the tool",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "A custom tool definition"
              }
            ],
            "description": "Tool choice option"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "top_p": {
            "nullable": true,
            "type": "number"
          },
          "top_k": {
            "nullable": true,
            "type": "number"
          },
          "frequency_penalty": {
            "nullable": true,
            "type": "number"
          },
          "presence_penalty": {
            "nullable": true,
            "type": "number"
          },
          "repetition_penalty": {
            "nullable": true,
            "type": "number"
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "seed": {
            "nullable": true,
            "type": "number"
          },
          "n": {
            "nullable": true,
            "type": "number"
          },
          "best_of": {
            "nullable": true,
            "type": "number"
          },
          "logprobs": {
            "nullable": true,
            "type": "boolean"
          },
          "top_logprobs": {
            "nullable": true,
            "type": "number"
          },
          "chat_template_kwargs": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "VllmChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "Function call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "A function tool call in the message"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "Custom tool call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "A custom tool call in the message"
                          }
                        ],
                        "description": "A tool call in the assistant message"
                      }
                    },
                    "reasoning": {
                      "nullable": true,
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "The assistant message in the response"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "A choice in the chat completion response"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {},
              "prompt_tokens_details": {}
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "Token usage statistics for the completion"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": false
      },
      "OllamaChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "A text content part"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "A developer message"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "A text content part"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "A system message"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "A text content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "Image URL details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "An image content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "Audio input details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "An audio content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "File details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "A file content part"
                              }
                            ],
                            "description": "A content part in a message"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "A user message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "A text content part"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "A refusal content part"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "Function call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "A function tool call in the message"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "Custom tool call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "A custom tool call in the message"
                          }
                        ],
                        "description": "A tool call in the assistant message"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "An assistant message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "A text content part"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "Image URL details"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "An image content part"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "A tool result message"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "A function result message (deprecated)"
                }
              ],
              "description": "A message in the conversation"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "A function definition for tool calling"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "A function tool definition"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool"
                        },
                        "description": {
                          "description": "Description of the tool",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "A custom tool definition"
                }
              ],
              "description": "A tool definition"
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model.\n    auto: allows the model to pick from allowed tools or generate a message.\n    required: requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    The parameters the functions accepts, described as a JSON Schema object.\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "A function definition for tool calling"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "A function tool definition"
                          }
                        }
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "Allowed tools configuration"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "Allowed tool choice configuration"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "Named function tool choice"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool"
                      },
                      "description": {
                        "description": "Description of the tool",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "A custom tool definition"
              }
            ],
            "description": "Tool choice option"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "top_p": {
            "nullable": true,
            "type": "number"
          },
          "frequency_penalty": {
            "nullable": true,
            "type": "number"
          },
          "presence_penalty": {
            "nullable": true,
            "type": "number"
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "seed": {
            "nullable": true,
            "type": "number"
          },
          "n": {
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "OllamaChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "Function call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "A function tool call in the message"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "Custom tool call details"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "A custom tool call in the message"
                          }
                        ],
                        "description": "A tool call in the assistant message"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "The assistant message in the response"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "A choice in the chat completion response"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {},
              "prompt_tokens_details": {}
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "Token usage statistics for the completion"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": false
      },
      "OllamaNativeChatRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string"
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {}
                    }
                  ]
                },
                "thinking": {
                  "type": "string"
                },
                "images": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tool_calls": {
                  "nullable": true,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "function": {
                        "type": "object",
                        "properties": {
                          "index": {
                            "type": "number"
                          },
                          "name": {
                            "type": "string"
                          },
                          "arguments": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "arguments"
                        ],
                        "additionalProperties": {}
                      }
                    },
                    "required": [
                      "function"
                    ],
                    "additionalProperties": {}
                  }
                },
                "tool_name": {
                  "type": "string"
                },
                "tool_call_id": {
                  "type": "string"
                }
              },
              "required": [
                "role"
              ],
              "additionalProperties": {}
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "function": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "parameters": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": {}
                }
              },
              "required": [
                "type",
                "function"
              ],
              "additionalProperties": {}
            }
          },
          "format": {},
          "options": {
            "type": "object",
            "properties": {
              "temperature": {
                "type": "number"
              },
              "top_k": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "top_p": {
                "type": "number"
              },
              "min_p": {
                "type": "number"
              },
              "typical_p": {
                "type": "number"
              },
              "seed": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "repeat_penalty": {
                "type": "number"
              },
              "repeat_last_n": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "presence_penalty": {
                "type": "number"
              },
              "frequency_penalty": {
                "type": "number"
              },
              "stop": {
                "maxItems": 16,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256
                }
              },
              "num_keep": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "num_ctx": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              "num_predict": {
                "type": "integer",
                "minimum": -2,
                "maximum": 9007199254740991
              }
            },
            "additionalProperties": false
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          },
          "keep_alive": {},
          "think": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              }
            ]
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "top_p": {
            "nullable": true,
            "type": "number"
          },
          "max_output_tokens": {
            "nullable": true,
            "type": "number"
          },
          "truncate": {
            "type": "boolean"
          },
          "shift": {
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": {}
      },
      "OllamaNativeChatResponse": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "message": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "content": {
                "type": "string"
              },
              "thinking": {
                "type": "string"
              },
              "tool_calls": {
                "nullable": true,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "index": {
                          "type": "number"
                        },
                        "name": {
                          "type": "string"
                        },
                        "arguments": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "arguments"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "function"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "role"
            ],
            "additionalProperties": {}
          },
          "done": {
            "type": "boolean"
          },
          "done_reason": {
            "type": "string"
          },
          "total_duration": {
            "type": "number"
          },
          "load_duration": {
            "type": "number"
          },
          "prompt_eval_count": {
            "type": "number"
          },
          "prompt_eval_duration": {
            "type": "number"
          },
          "eval_count": {
            "type": "number"
          },
          "eval_duration": {
            "type": "number"
          }
        },
        "required": [
          "model",
          "message",
          "done"
        ],
        "additionalProperties": {}
      },
      "ZhipuaiChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "content": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false,
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                              }
                            ],
                            "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                          }
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "additionalProperties": false,
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                          }
                        ],
                        "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                      }
                    },
                    "function_call": {
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "type": "string"
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                }
              ],
              "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://docs.z.ai/api-reference/llm/chat-completion#body\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://docs.z.ai/api-reference/llm/chat-completion#body\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://docs.z.ai/api-reference/llm/chat-completion#body\n  "
              }
            ],
            "description": "https://docs.z.ai/api-reference/llm/chat-completion#body"
          },
          "request_id": {
            "type": "string"
          },
          "do_sample": {
            "type": "boolean"
          },
          "stream": {
            "type": "boolean"
          },
          "thinking": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ]
              },
              "clear_thinking": {
                "type": "boolean"
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "top_p": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "tool_stream": {
            "type": "boolean"
          },
          "stop": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "json_object"
                ]
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "ZhipuaiChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "sensitive",
                        "network_error"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "reasoning_content": {
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                          }
                        ],
                        "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                      }
                    },
                    "function_call": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "prompt_tokens_details": {
                "description": "https://docs.z.ai/api-reference/llm/chat-completion#response",
                "type": "object",
                "properties": {
                  "cached_tokens": {
                    "type": "number"
                  }
                },
                "required": [
                  "cached_tokens"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://docs.z.ai/api-reference/llm/chat-completion#response"
          },
          "web_search": {
            "description": "https://docs.z.ai/api-reference/llm/chat-completion#response",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                },
                "link": {
                  "type": "string"
                },
                "media": {
                  "type": "string"
                },
                "icon": {
                  "type": "string"
                },
                "refer": {
                  "type": "string"
                },
                "publish_date": {
                  "type": "string"
                }
              },
              "required": [
                "title",
                "content",
                "link",
                "media",
                "icon",
                "refer",
                "publish_date"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": false
      },
      "DeepSeekChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": {}
      },
      "DeepSeekChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "ArchestraChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": {}
      },
      "ArchestraChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "MinimaxChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    },
                    "reasoning_details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false
                },
                {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "developer"
                          ]
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "system"
                          ]
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image_url"
                                        ]
                                      },
                                      "image_url": {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          },
                                          "detail": {
                                            "type": "string",
                                            "enum": [
                                              "auto",
                                              "low",
                                              "high"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "image_url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "input_audio"
                                        ]
                                      },
                                      "input_audio": {
                                        "type": "object",
                                        "properties": {
                                          "data": {
                                            "type": "string"
                                          },
                                          "format": {
                                            "type": "string",
                                            "enum": [
                                              "wav",
                                              "mp3"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "data",
                                          "format"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "input_audio"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "file"
                                        ]
                                      },
                                      "file": {
                                        "type": "object",
                                        "properties": {
                                          "file_data": {
                                            "type": "string"
                                          },
                                          "file_id": {
                                            "type": "string"
                                          },
                                          "filename": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "file"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                  }
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "user"
                          ]
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "assistant"
                          ]
                        },
                        "audio": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ],
                          "additionalProperties": false
                        },
                        "content": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "refusal"
                                    ]
                                  },
                                  "refusal": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "refusal"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                              }
                            }
                          ]
                        },
                        "function_call": {
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "arguments": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "arguments",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "name": {
                          "type": "string"
                        },
                        "reasoning_content": {
                          "nullable": true,
                          "type": "string"
                        },
                        "refusal": {
                          "nullable": true,
                          "type": "string"
                        },
                        "tool_calls": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "function"
                                    ]
                                  },
                                  "function": {
                                    "type": "object",
                                    "properties": {
                                      "arguments": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "arguments",
                                      "name"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "function"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "custom"
                                    ]
                                  },
                                  "custom": {
                                    "type": "object",
                                    "properties": {
                                      "input": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "input",
                                      "name"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "custom"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                          }
                        }
                      },
                      "required": [
                        "role"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "tool"
                          ]
                        },
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image_url"
                                        ]
                                      },
                                      "image_url": {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string"
                                          },
                                          "detail": {
                                            "type": "string",
                                            "enum": [
                                              "auto",
                                              "low",
                                              "high"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "image_url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "tool_call_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content",
                        "tool_call_id"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "function"
                          ]
                        },
                        "content": {
                          "nullable": true,
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content",
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                    }
                  ],
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                }
              ]
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "nullable": true,
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "top_p": {
            "nullable": true,
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "n": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "json_object"
                ]
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          "user": {
            "type": "string"
          },
          "reasoning_split": {
            "type": "boolean"
          },
          "thinking": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ]
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          "extra_body": {
            "type": "object",
            "properties": {
              "reasoning_split": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "MinimaxChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "reasoning_details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://platform.minimax.io/docs/api-reference/text-openai-api#response"
                }
              },
              "required": [
                "finish_reason",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://platform.minimax.io/docs/api-reference/text-openai-api#response"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "type": "object",
                "properties": {
                  "reasoning_tokens": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://platform.minimax.io/docs/api-reference/text-openai-api#usage"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": false
      },
      "XaiChatCompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "developer"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                },
                {
                  "type": "object",
                  "properties": {
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input_audio"
                                    ]
                                  },
                                  "input_audio": {
                                    "type": "object",
                                    "properties": {
                                      "data": {
                                        "type": "string"
                                      },
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "wav",
                                          "mp3"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "data",
                                      "format"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                  }
                                },
                                "required": [
                                  "type",
                                  "input_audio"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "file_data": {
                                        "type": "string"
                                      },
                                      "file_id": {
                                        "type": "string"
                                      },
                                      "filename": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                  }
                                },
                                "required": [
                                  "type",
                                  "file"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                              }
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                          }
                        }
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user"
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content",
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "audio": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "content": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "text"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "refusal"
                                ]
                              },
                              "refusal": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "refusal"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                          }
                        }
                      ]
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string"
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "tool"
                      ]
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "text"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "image_url"
                                    ]
                                  },
                                  "image_url": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "detail": {
                                        "type": "string",
                                        "enum": [
                                          "auto",
                                          "low",
                                          "high"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                  }
                                },
                                "required": [
                                  "type",
                                  "image_url"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "tool_call_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "tool_call_id"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "content",
                    "name"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                }
              ],
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "function"
                      ]
                    },
                    "function": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "parameters": {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "strict": {
                          "nullable": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                    }
                  },
                  "required": [
                    "type",
                    "function"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "custom"
                      ]
                    },
                    "custom": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the custom tool, used to identify it in tool calls"
                        },
                        "description": {
                          "description": "Optional description of the custom tool, used to provide more context",
                          "type": "string"
                        },
                        "format": {
                          "description": "The input format for the custom tool. Default is unconstrained text.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text"
                                  ],
                                  "description": "Unconstrained text format. Always `text`"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false,
                              "description": "Unconstrained free-form text"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "grammar"
                                  ]
                                },
                                "grammar": {
                                  "type": "object",
                                  "properties": {
                                    "definition": {
                                      "type": "string",
                                      "description": "The grammar definition"
                                    },
                                    "syntax": {
                                      "type": "string",
                                      "enum": [
                                        "lark",
                                        "regex"
                                      ],
                                      "description": "The syntax of the grammar definition"
                                    }
                                  },
                                  "required": [
                                    "definition",
                                    "syntax"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Your chosen grammar"
                                }
                              },
                              "required": [
                                "type",
                                "grammar"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "type",
                    "custom"
                  ],
                  "additionalProperties": false,
                  "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                }
              ],
              "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
            }
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "allowed_tools"
                    ]
                  },
                  "allowed_tools": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "required"
                        ],
                        "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "parameters": {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  "strict": {
                                    "nullable": true,
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                              }
                            },
                            "required": [
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                          }
                        },
                        "description": "A list of tool definitions that the model should be allowed to call"
                      }
                    },
                    "required": [
                      "mode",
                      "tools"
                    ],
                    "additionalProperties": false,
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                  }
                },
                "required": [
                  "type",
                  "allowed_tools"
                ],
                "additionalProperties": false,
                "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "function"
                    ]
                  },
                  "function": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "function"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "custom"
                    ]
                  },
                  "custom": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the custom tool, used to identify it in tool calls"
                      },
                      "description": {
                        "description": "Optional description of the custom tool, used to provide more context",
                        "type": "string"
                      },
                      "format": {
                        "description": "The input format for the custom tool. Default is unconstrained text.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ],
                                "description": "Unconstrained text format. Always `text`"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false,
                            "description": "Unconstrained free-form text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "grammar"
                                ]
                              },
                              "grammar": {
                                "type": "object",
                                "properties": {
                                  "definition": {
                                    "type": "string",
                                    "description": "The grammar definition"
                                  },
                                  "syntax": {
                                    "type": "string",
                                    "enum": [
                                      "lark",
                                      "regex"
                                    ],
                                    "description": "The syntax of the grammar definition"
                                  }
                                },
                                "required": [
                                  "definition",
                                  "syntax"
                                ],
                                "additionalProperties": false,
                                "description": "Your chosen grammar"
                              }
                            },
                            "required": [
                              "type",
                              "grammar"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type",
                  "custom"
                ],
                "additionalProperties": false,
                "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
              }
            ],
            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
          },
          "temperature": {
            "nullable": true,
            "type": "number"
          },
          "max_tokens": {
            "nullable": true,
            "type": "number"
          },
          "max_completion_tokens": {
            "nullable": true,
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "reasoning_effort": {
            "nullable": true,
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          },
          "stream": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": false
      },
      "XaiChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "finish_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "stop",
                        "length",
                        "tool_calls",
                        "content_filter",
                        "function_call"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "index": {
                  "type": "number"
                },
                "logprobs": {
                  "nullable": true
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "refusal": {
                      "nullable": true,
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "assistant"
                      ]
                    },
                    "annotations": {
                      "nullable": true,
                      "type": "array",
                      "items": {}
                    },
                    "audio": {
                      "nullable": true
                    },
                    "function_call": {
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "arguments": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "arguments",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "reasoning_content": {
                      "nullable": true,
                      "type": "string"
                    },
                    "tool_calls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function"
                                ]
                              },
                              "function": {
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "function"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "custom"
                                ]
                              },
                              "custom": {
                                "type": "object",
                                "properties": {
                                  "input": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "input",
                                  "name"
                                ],
                                "additionalProperties": false,
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "custom"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                          }
                        ],
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                      }
                    }
                  },
                  "required": [
                    "role"
                  ],
                  "additionalProperties": false,
                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                }
              },
              "required": [
                "finish_reason",
                "logprobs",
                "message"
              ],
              "additionalProperties": false,
              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
            }
          },
          "created": {
            "type": "number"
          },
          "model": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "server_tier": {
            "type": "string"
          },
          "system_fingerprint": {
            "nullable": true,
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "completion_tokens": {
                "type": "number"
              },
              "prompt_tokens": {
                "type": "number"
              },
              "total_tokens": {
                "type": "number"
              },
              "completion_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
              },
              "prompt_tokens_details": {
                "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
              }
            },
            "required": [
              "completion_tokens",
              "prompt_tokens",
              "total_tokens"
            ],
            "additionalProperties": false,
            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
          }
        },
        "required": [
          "id",
          "choices",
          "created",
          "model",
          "object"
        ],
        "additionalProperties": {}
      },
      "UserConfigFieldDefault": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        ]
      },
      "UserConfigField": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "boolean",
              "directory",
              "file"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "promptOnInstallation": {
            "type": "boolean"
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserConfigFieldDefault"
              }
            ]
          },
          "multiple": {
            "type": "boolean"
          },
          "sensitive": {
            "type": "boolean"
          },
          "min": {
            "type": "number"
          },
          "max": {
            "type": "number"
          },
          "headerName": {
            "type": "string"
          },
          "valuePrefix": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "description"
        ],
        "additionalProperties": false
      }
    }
  },
  "paths": {
    "/v1/a2a/{agentId}/.well-known/agent.json": {
      "get": {
        "tags": [
          "A2A"
        ],
        "description": "Get A2A AgentCard for an internal agent (must be agentType='agent')",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "capabilities": {
                      "type": "object",
                      "properties": {
                        "streaming": {
                          "type": "boolean"
                        },
                        "pushNotifications": {
                          "type": "boolean"
                        },
                        "stateTransitionHistory": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "streaming",
                        "pushNotifications",
                        "stateTransitionHistory"
                      ],
                      "additionalProperties": false
                    },
                    "defaultInputModes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultOutputModes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "skills": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "inputModes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "outputModes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "tags",
                          "inputModes",
                          "outputModes"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "name",
                    "description",
                    "url",
                    "version",
                    "capabilities",
                    "defaultInputModes",
                    "defaultOutputModes",
                    "skills"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/a2a/{agentId}": {
      "post": {
        "tags": [
          "A2A"
        ],
        "description": "Execute A2A message on an internal agent (must be agentType='agent'). Accepts a JSON-RPC envelope or any JSON payload — non-JSON-RPC payloads are stringified and passed through to the agent as the user message.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "type": "string",
                        "enum": [
                          "2.0"
                        ]
                      },
                      "id": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          }
                        ]
                      },
                      "method": {
                        "type": "string"
                      },
                      "params": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "type": "object",
                            "properties": {
                              "parts": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "text"
                                      ]
                                    },
                                    "text": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "text"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "id",
                      "method"
                    ]
                  }
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "messageId": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent"
                          ]
                        },
                        "parts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "text"
                                ]
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "text"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "contextId": {
                          "type": "string"
                        },
                        "taskId": {
                          "type": "string"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "messageId",
                        "role",
                        "parts"
                      ],
                      "additionalProperties": false
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "number"
                        },
                        "message": {
                          "type": "string"
                        },
                        "data": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "jsonrpc",
                    "id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v2/a2a/agents": {
      "get": {
        "tags": [
          "A2A"
        ],
        "description": "List the A2A AgentCards the presented credential is allowed to reach",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          },
                          "documentationUrl": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "organization": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "url",
                              "organization"
                            ],
                            "additionalProperties": false
                          },
                          "supportedInterfaces": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                },
                                "protocolBinding": {
                                  "type": "string"
                                },
                                "protocolVersion": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "url",
                                "protocolBinding",
                                "protocolVersion"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "capabilities": {
                            "type": "object",
                            "properties": {
                              "streaming": {
                                "type": "boolean"
                              },
                              "pushNotifications": {
                                "type": "boolean"
                              },
                              "extendedAgentCard": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "streaming",
                              "pushNotifications",
                              "extendedAgentCard"
                            ],
                            "additionalProperties": false
                          },
                          "securitySchemes": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "scheme": {
                                  "type": "string"
                                },
                                "bearerFormat": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "securityRequirements": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "defaultInputModes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "defaultOutputModes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "skills": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "examples": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "inputModes": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "outputModes": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "description",
                                "tags",
                                "inputModes",
                                "outputModes"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "name",
                          "description",
                          "version",
                          "provider",
                          "supportedInterfaces",
                          "capabilities",
                          "securitySchemes",
                          "securityRequirements",
                          "defaultInputModes",
                          "defaultOutputModes",
                          "skills"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "agents"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v2/a2a/{agentId}/.well-known/agent-card.json": {
      "get": {
        "tags": [
          "A2A"
        ],
        "description": "Get A2A AgentCard for an internal agent (must be agentType='agent')",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "documentationUrl": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "organization": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url",
                        "organization"
                      ],
                      "additionalProperties": false
                    },
                    "supportedInterfaces": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string"
                          },
                          "protocolBinding": {
                            "type": "string"
                          },
                          "protocolVersion": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "url",
                          "protocolBinding",
                          "protocolVersion"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "capabilities": {
                      "type": "object",
                      "properties": {
                        "streaming": {
                          "type": "boolean"
                        },
                        "pushNotifications": {
                          "type": "boolean"
                        },
                        "extendedAgentCard": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "streaming",
                        "pushNotifications",
                        "extendedAgentCard"
                      ],
                      "additionalProperties": false
                    },
                    "securitySchemes": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "scheme": {
                            "type": "string"
                          },
                          "bearerFormat": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "securityRequirements": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "defaultInputModes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultOutputModes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "skills": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "examples": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "inputModes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "outputModes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "tags",
                          "inputModes",
                          "outputModes"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "name",
                    "description",
                    "version",
                    "provider",
                    "supportedInterfaces",
                    "capabilities",
                    "securitySchemes",
                    "securityRequirements",
                    "defaultInputModes",
                    "defaultOutputModes",
                    "skills"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "304": {
            "description": "Default Response"
          }
        }
      }
    },
    "/v2/a2a/{agentId}": {
      "post": {
        "tags": [
          "A2A"
        ],
        "description": "Main A2A JSON-RPC endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {}
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "method"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    },
                    "result": {},
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "number"
                        },
                        "message": {
                          "type": "string"
                        },
                        "data": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "jsonrpc",
                    "id"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/agents": {
      "get": {
        "operationId": "getAgents",
        "tags": [
          "Agents"
        ],
        "description": "Get all agents with pagination, sorting, and filtering\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nChecked dynamically based on agent type. `profile` and `agent` require `agent:read`; `mcp_gateway` requires `mcpGateway:read`; `llm_proxy` requires `llmProxy:read`. If no type filter is provided, the user must have read access to at least one agent type.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "name",
            "required": false,
            "description": "Filter by agent name"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "profile",
                "mcp_gateway",
                "llm_proxy",
                "agent"
              ]
            },
            "in": "query",
            "name": "agentType",
            "required": false,
            "description": "Filter by agent type. 'profile' = external API gateway profiles, 'mcp_gateway' = MCP gateway, 'llm_proxy' = LLM proxy, 'agent' = internal agents with prompts."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "profile",
                  "mcp_gateway",
                  "llm_proxy",
                  "agent"
                ]
              }
            },
            "in": "query",
            "name": "agentTypes",
            "required": false,
            "description": "Filter by multiple agent types (comma-separated). Takes precedence over agentType if both provided."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "personal",
                "team",
                "org",
                "built_in"
              ]
            },
            "in": "query",
            "name": "scope",
            "required": false,
            "description": "Filter by scope: personal, team, org, or built_in."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "teamIds",
            "required": false,
            "description": "Filter by specific team IDs (comma-separated). Only used when scope=team."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "authorIds",
            "required": false,
            "description": "Filter by author user IDs (comma-separated). Admin-only, only used when scope=personal."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "excludeAuthorIds",
            "required": false,
            "description": "Exclude agents by author user IDs (comma-separated). Admin-only, only used when scope=personal."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter by labels. Format: key1:val1|val2;key2:val3. AND across keys, OR within values."
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "excludeOtherPersonalAgents",
            "required": false,
            "description": "Hide personal agents owned by other users. Admin-only; no-op for non-admins."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by lifecycle status. Deleted rows require delete permission."
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "createdAt",
                "toolsCount",
                "subagentsCount",
                "knowledgeSourcesCount",
                "team",
                "lastUsedAt"
              ]
            },
            "in": "query",
            "name": "sortBy",
            "required": false
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "authorId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "nullable": true,
                            "type": "string"
                          },
                          "isDefault": {
                            "type": "boolean"
                          },
                          "isPersonalGateway": {
                            "type": "boolean"
                          },
                          "isPersonalProxy": {
                            "type": "boolean"
                          },
                          "considerContextUntrusted": {
                            "type": "boolean"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "systemPrompt": {
                            "nullable": true,
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "icon": {
                            "nullable": true,
                            "type": "string"
                          },
                          "incomingEmailEnabled": {
                            "type": "boolean"
                          },
                          "incomingEmailSecurityMode": {
                            "type": "string",
                            "enum": [
                              "private",
                              "internal",
                              "public"
                            ]
                          },
                          "incomingEmailAllowedDomain": {
                            "nullable": true,
                            "type": "string"
                          },
                          "llmApiKeyId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "llmModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "modelId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "identityProviderId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "environmentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "passthroughHeaders": {
                            "nullable": true,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "toolExposureMode": {
                            "type": "string",
                            "enum": [
                              "full",
                              "search_and_run_only"
                            ]
                          },
                          "accessAllTools": {
                            "type": "boolean"
                          },
                          "accessAllSkills": {
                            "type": "boolean"
                          },
                          "accessAllSubagents": {
                            "type": "boolean"
                          },
                          "builtInAgentConfig": {
                            "nullable": true,
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "enum": [
                                      "policy-configuration-subagent"
                                    ]
                                  },
                                  "autoConfigureOnToolDiscovery": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "name",
                                  "autoConfigureOnToolDiscovery"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "enum": [
                                      "dual-llm-main-agent"
                                    ]
                                  },
                                  "maxRounds": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 20
                                  }
                                },
                                "required": [
                                  "name",
                                  "maxRounds"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "enum": [
                                      "dual-llm-quarantine-agent"
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "enum": [
                                      "context-compaction-subagent"
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "enum": [
                                      "chat-title-generation-subagent"
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "enum": [
                                      "app-runtime-llm-agent"
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "enum": [
                                      "advisor-agent"
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "builtIn": {
                            "nullable": true,
                            "type": "boolean"
                          },
                          "latestVersion": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "tools": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "agentId": {
                                  "nullable": true,
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "catalogId": {
                                  "nullable": true,
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "delegateToAgentId": {
                                  "nullable": true,
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "rawName": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "parameters": {
                                  "anyOf": [
                                    {
                                      "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  ]
                                },
                                "description": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "meta": {
                                  "nullable": true,
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "string",
                                          "nullable": true,
                                          "enum": [
                                            null
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "additionalProperties": {}
                                    },
                                    {
                                      "type": "array",
                                      "items": {}
                                    }
                                  ]
                                },
                                "clonedPendingDiscovery": {
                                  "type": "boolean"
                                },
                                "policiesAutoConfiguredAt": {
                                  "nullable": true,
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "policiesAutoConfiguringStartedAt": {
                                  "nullable": true,
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "policiesAutoConfiguredReasoning": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "policiesAutoConfiguredModel": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "deletedAt": {
                                  "nullable": true,
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "id",
                                "agentId",
                                "catalogId",
                                "delegateToAgentId",
                                "name",
                                "rawName",
                                "description",
                                "meta",
                                "clonedPendingDiscovery",
                                "policiesAutoConfiguredAt",
                                "policiesAutoConfiguringStartedAt",
                                "policiesAutoConfiguredReasoning",
                                "policiesAutoConfiguredModel",
                                "createdAt",
                                "updatedAt",
                                "deletedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "teams": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "email": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "email"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "labels": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "keyId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "valueId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                }
                              },
                              "required": [
                                "key",
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "authorName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "authorEmail": {
                            "nullable": true,
                            "type": "string"
                          },
                          "knowledgeBaseIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "connectorIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "suggestedPrompts": {
                            "default": [],
                            "maxItems": 10,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "summaryTitle": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 50
                                },
                                "prompt": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 5000
                                }
                              },
                              "required": [
                                "summaryTitle",
                                "prompt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "resolvedLlmProvider": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "openai",
                              "gemini",
                              "anthropic",
                              "bedrock",
                              "cohere",
                              "cerebras",
                              "mistral",
                              "perplexity",
                              "groq",
                              "xai",
                              "openrouter",
                              "vllm",
                              "ollama",
                              "ollama-native",
                              "zhipuai",
                              "deepseek",
                              "minimax",
                              "kimi",
                              "azure",
                              "github-copilot",
                              "microsoft-365-copilot",
                              "archestra"
                            ]
                          },
                          "resolvedLlmModelName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "llmProviderRequiresPerUserCredential": {
                            "type": "boolean"
                          },
                          "sandboxAvailable": {
                            "type": "boolean"
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "authorId",
                          "scope",
                          "name",
                          "slug",
                          "isDefault",
                          "isPersonalGateway",
                          "isPersonalProxy",
                          "considerContextUntrusted",
                          "agentType",
                          "systemPrompt",
                          "description",
                          "icon",
                          "incomingEmailEnabled",
                          "incomingEmailSecurityMode",
                          "incomingEmailAllowedDomain",
                          "llmApiKeyId",
                          "llmModel",
                          "modelId",
                          "identityProviderId",
                          "environmentId",
                          "passthroughHeaders",
                          "toolExposureMode",
                          "accessAllTools",
                          "accessAllSkills",
                          "accessAllSubagents",
                          "builtInAgentConfig",
                          "builtIn",
                          "latestVersion",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "tools",
                          "teams",
                          "labels",
                          "knowledgeBaseIds",
                          "connectorIds",
                          "suggestedPrompts"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Checked dynamically based on agent type. `profile` and `agent` require `agent:read`; `mcp_gateway` requires `mcpGateway:read`; `llm_proxy` requires `llmProxy:read`. If no type filter is provided, the user must have read access to at least one agent type.",
          "permissions": []
        }
      },
      "post": {
        "operationId": "createAgent",
        "tags": [
          "Agents"
        ],
        "description": "Create a new agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nChecked dynamically based on the agent type being created. `profile` and `agent` require `agent:create`; `mcp_gateway` requires `mcpGateway:create`; `llm_proxy` requires `llmProxy:create`. Additional scope and team-admin checks may apply.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organizationId": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "isPersonalProxy": {
                    "type": "boolean"
                  },
                  "considerContextUntrusted": {
                    "type": "boolean"
                  },
                  "agentType": {
                    "type": "string",
                    "enum": [
                      "profile",
                      "mcp_gateway",
                      "llm_proxy",
                      "agent"
                    ]
                  },
                  "systemPrompt": {
                    "nullable": true,
                    "type": "string"
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  },
                  "icon": {
                    "nullable": true,
                    "type": "string"
                  },
                  "incomingEmailEnabled": {
                    "type": "boolean"
                  },
                  "incomingEmailSecurityMode": {
                    "type": "string",
                    "enum": [
                      "private",
                      "internal",
                      "public"
                    ]
                  },
                  "incomingEmailAllowedDomain": {
                    "nullable": true,
                    "type": "string"
                  },
                  "llmApiKeyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "llmModel": {
                    "nullable": true,
                    "type": "string"
                  },
                  "modelId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "identityProviderId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "passthroughHeaders": {
                    "nullable": true,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-zA-Z0-9-]+$"
                    }
                  },
                  "toolExposureMode": {
                    "type": "string",
                    "enum": [
                      "full",
                      "search_and_run_only"
                    ]
                  },
                  "accessAllTools": {
                    "type": "boolean"
                  },
                  "accessAllSubagents": {
                    "type": "boolean"
                  },
                  "builtInAgentConfig": {
                    "nullable": true,
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "policy-configuration-subagent"
                            ]
                          },
                          "autoConfigureOnToolDiscovery": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "name",
                          "autoConfigureOnToolDiscovery"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "dual-llm-main-agent"
                            ]
                          },
                          "maxRounds": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 20
                          }
                        },
                        "required": [
                          "name",
                          "maxRounds"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "dual-llm-quarantine-agent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "context-compaction-subagent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "chat-title-generation-subagent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "app-runtime-llm-agent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "advisor-agent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      }
                    ]
                  },
                  "deletedAt": {
                    "nullable": true
                  },
                  "teams": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "users": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "keyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "valueId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  },
                  "knowledgeBaseIds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "connectorIds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "suggestedPrompts": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "summaryTitle": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50
                        },
                        "prompt": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 5000
                        }
                      },
                      "required": [
                        "summaryTitle",
                        "prompt"
                      ]
                    }
                  }
                },
                "required": [
                  "scope",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isPersonalGateway": {
                      "type": "boolean"
                    },
                    "isPersonalProxy": {
                      "type": "boolean"
                    },
                    "considerContextUntrusted": {
                      "type": "boolean"
                    },
                    "agentType": {
                      "type": "string",
                      "enum": [
                        "profile",
                        "mcp_gateway",
                        "llm_proxy",
                        "agent"
                      ]
                    },
                    "systemPrompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "incomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "incomingEmailSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "incomingEmailAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "llmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "identityProviderId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "passthroughHeaders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "toolExposureMode": {
                      "type": "string",
                      "enum": [
                        "full",
                        "search_and_run_only"
                      ]
                    },
                    "accessAllTools": {
                      "type": "boolean"
                    },
                    "accessAllSkills": {
                      "type": "boolean"
                    },
                    "accessAllSubagents": {
                      "type": "boolean"
                    },
                    "builtInAgentConfig": {
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "policy-configuration-subagent"
                              ]
                            },
                            "autoConfigureOnToolDiscovery": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "autoConfigureOnToolDiscovery"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-main-agent"
                              ]
                            },
                            "maxRounds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "name",
                            "maxRounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-quarantine-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "context-compaction-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "chat-title-generation-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "app-runtime-llm-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "advisor-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "builtIn": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "delegateToAgentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rawName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "meta": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "clonedPendingDiscovery": {
                            "type": "boolean"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguringStartedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "catalogId",
                          "delegateToAgentId",
                          "name",
                          "rawName",
                          "description",
                          "meta",
                          "clonedPendingDiscovery",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguringStartedAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "knowledgeBaseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suggestedPrompts": {
                      "default": [],
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolvedLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "resolvedLlmModelName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmProviderRequiresPerUserCredential": {
                      "type": "boolean"
                    },
                    "sandboxAvailable": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "slug",
                    "isDefault",
                    "isPersonalGateway",
                    "isPersonalProxy",
                    "considerContextUntrusted",
                    "agentType",
                    "systemPrompt",
                    "description",
                    "icon",
                    "incomingEmailEnabled",
                    "incomingEmailSecurityMode",
                    "incomingEmailAllowedDomain",
                    "llmApiKeyId",
                    "llmModel",
                    "modelId",
                    "identityProviderId",
                    "environmentId",
                    "passthroughHeaders",
                    "toolExposureMode",
                    "accessAllTools",
                    "accessAllSkills",
                    "accessAllSubagents",
                    "builtInAgentConfig",
                    "builtIn",
                    "latestVersion",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tools",
                    "teams",
                    "labels",
                    "knowledgeBaseIds",
                    "connectorIds",
                    "suggestedPrompts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Checked dynamically based on the agent type being created. `profile` and `agent` require `agent:create`; `mcp_gateway` requires `mcpGateway:create`; `llm_proxy` requires `llmProxy:create`. Additional scope and team-admin checks may apply.",
          "permissions": []
        }
      }
    },
    "/api/agents/all": {
      "get": {
        "operationId": "getAllAgents",
        "tags": [
          "Agents"
        ],
        "description": "Get all agents without pagination\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nChecked dynamically based on agent type. `profile` and `agent` require `agent:read`; `mcp_gateway` requires `mcpGateway:read`; `llm_proxy` requires `llmProxy:read`. If no type filter is provided, the user must have read access to at least one agent type.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "profile",
                "mcp_gateway",
                "llm_proxy",
                "agent"
              ]
            },
            "in": "query",
            "name": "agentType",
            "required": false,
            "description": "Filter by agent type. 'profile' = external API gateway profiles, 'mcp_gateway' = MCP gateway, 'llm_proxy' = LLM proxy, 'agent' = internal agents with prompts."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "profile",
                  "mcp_gateway",
                  "llm_proxy",
                  "agent"
                ]
              }
            },
            "in": "query",
            "name": "agentTypes",
            "required": false,
            "description": "Filter by multiple agent types (comma-separated). Takes precedence over agentType if both provided."
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "excludeBuiltIn",
            "required": false,
            "description": "Exclude built-in agents from the results. Defaults to false."
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "includeAdvisor",
            "required": false,
            "description": "Keep the advisor in the results while built-in agents are excluded. For pickers that choose a subagent to delegate to."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "personal",
                "team",
                "org",
                "built_in"
              ]
            },
            "in": "query",
            "name": "scope",
            "required": false,
            "description": "Filter by scope: personal, team, org, or built_in."
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "excludeOtherPersonalAgents",
            "required": false,
            "description": "Hide personal agents owned by other users. Admin-only; no-op for non-admins (their access control already excludes them)."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by lifecycle status. Deleted rows require delete permission."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "authorId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ]
                      },
                      "name": {
                        "type": "string"
                      },
                      "slug": {
                        "nullable": true,
                        "type": "string"
                      },
                      "isDefault": {
                        "type": "boolean"
                      },
                      "isPersonalGateway": {
                        "type": "boolean"
                      },
                      "isPersonalProxy": {
                        "type": "boolean"
                      },
                      "considerContextUntrusted": {
                        "type": "boolean"
                      },
                      "agentType": {
                        "type": "string",
                        "enum": [
                          "profile",
                          "mcp_gateway",
                          "llm_proxy",
                          "agent"
                        ]
                      },
                      "systemPrompt": {
                        "nullable": true,
                        "type": "string"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "icon": {
                        "nullable": true,
                        "type": "string"
                      },
                      "incomingEmailEnabled": {
                        "type": "boolean"
                      },
                      "incomingEmailSecurityMode": {
                        "type": "string",
                        "enum": [
                          "private",
                          "internal",
                          "public"
                        ]
                      },
                      "incomingEmailAllowedDomain": {
                        "nullable": true,
                        "type": "string"
                      },
                      "llmApiKeyId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "llmModel": {
                        "nullable": true,
                        "type": "string"
                      },
                      "modelId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "identityProviderId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "environmentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "passthroughHeaders": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "toolExposureMode": {
                        "type": "string",
                        "enum": [
                          "full",
                          "search_and_run_only"
                        ]
                      },
                      "accessAllTools": {
                        "type": "boolean"
                      },
                      "accessAllSkills": {
                        "type": "boolean"
                      },
                      "accessAllSubagents": {
                        "type": "boolean"
                      },
                      "builtInAgentConfig": {
                        "nullable": true,
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "policy-configuration-subagent"
                                ]
                              },
                              "autoConfigureOnToolDiscovery": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "name",
                              "autoConfigureOnToolDiscovery"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "dual-llm-main-agent"
                                ]
                              },
                              "maxRounds": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 20
                              }
                            },
                            "required": [
                              "name",
                              "maxRounds"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "dual-llm-quarantine-agent"
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "context-compaction-subagent"
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "chat-title-generation-subagent"
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "app-runtime-llm-agent"
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "enum": [
                                  "advisor-agent"
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "builtIn": {
                        "nullable": true,
                        "type": "boolean"
                      },
                      "latestVersion": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "agentId": {
                              "nullable": true,
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "catalogId": {
                              "nullable": true,
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "delegateToAgentId": {
                              "nullable": true,
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "name": {
                              "type": "string"
                            },
                            "rawName": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "anyOf": [
                                {
                                  "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              ]
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "meta": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "string",
                                      "nullable": true,
                                      "enum": [
                                        null
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "array",
                                  "items": {}
                                }
                              ]
                            },
                            "clonedPendingDiscovery": {
                              "type": "boolean"
                            },
                            "policiesAutoConfiguredAt": {
                              "nullable": true,
                              "type": "string",
                              "format": "date-time"
                            },
                            "policiesAutoConfiguringStartedAt": {
                              "nullable": true,
                              "type": "string",
                              "format": "date-time"
                            },
                            "policiesAutoConfiguredReasoning": {
                              "nullable": true,
                              "type": "string"
                            },
                            "policiesAutoConfiguredModel": {
                              "nullable": true,
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "deletedAt": {
                              "nullable": true,
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "agentId",
                            "catalogId",
                            "delegateToAgentId",
                            "name",
                            "rawName",
                            "description",
                            "meta",
                            "clonedPendingDiscovery",
                            "policiesAutoConfiguredAt",
                            "policiesAutoConfiguringStartedAt",
                            "policiesAutoConfiguredReasoning",
                            "policiesAutoConfiguredModel",
                            "createdAt",
                            "updatedAt",
                            "deletedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "teams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "users": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "email"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "labels": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1
                            },
                            "keyId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "valueId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            }
                          },
                          "required": [
                            "key",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "authorName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "authorEmail": {
                        "nullable": true,
                        "type": "string"
                      },
                      "knowledgeBaseIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "connectorIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "suggestedPrompts": {
                        "default": [],
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "summaryTitle": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 50
                            },
                            "prompt": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 5000
                            }
                          },
                          "required": [
                            "summaryTitle",
                            "prompt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "resolvedLlmProvider": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "openai",
                          "gemini",
                          "anthropic",
                          "bedrock",
                          "cohere",
                          "cerebras",
                          "mistral",
                          "perplexity",
                          "groq",
                          "xai",
                          "openrouter",
                          "vllm",
                          "ollama",
                          "ollama-native",
                          "zhipuai",
                          "deepseek",
                          "minimax",
                          "kimi",
                          "azure",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "archestra"
                        ]
                      },
                      "resolvedLlmModelName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "llmProviderRequiresPerUserCredential": {
                        "type": "boolean"
                      },
                      "sandboxAvailable": {
                        "type": "boolean"
                      },
                      "lastUsedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "authorId",
                      "scope",
                      "name",
                      "slug",
                      "isDefault",
                      "isPersonalGateway",
                      "isPersonalProxy",
                      "considerContextUntrusted",
                      "agentType",
                      "systemPrompt",
                      "description",
                      "icon",
                      "incomingEmailEnabled",
                      "incomingEmailSecurityMode",
                      "incomingEmailAllowedDomain",
                      "llmApiKeyId",
                      "llmModel",
                      "modelId",
                      "identityProviderId",
                      "environmentId",
                      "passthroughHeaders",
                      "toolExposureMode",
                      "accessAllTools",
                      "accessAllSkills",
                      "accessAllSubagents",
                      "builtInAgentConfig",
                      "builtIn",
                      "latestVersion",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "tools",
                      "teams",
                      "labels",
                      "knowledgeBaseIds",
                      "connectorIds",
                      "suggestedPrompts"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Checked dynamically based on agent type. `profile` and `agent` require `agent:read`; `mcp_gateway` requires `mcpGateway:read`; `llm_proxy` requires `llmProxy:read`. If no type filter is provided, the user must have read access to at least one agent type.",
          "permissions": []
        }
      }
    },
    "/api/mcp-gateways/default": {
      "get": {
        "operationId": "getDefaultMcpGateway",
        "tags": [
          "MCP Gateway"
        ],
        "description": "Get default MCP Gateway\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpGateway:read`: View and list MCP gateways",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isPersonalGateway": {
                      "type": "boolean"
                    },
                    "isPersonalProxy": {
                      "type": "boolean"
                    },
                    "considerContextUntrusted": {
                      "type": "boolean"
                    },
                    "agentType": {
                      "type": "string",
                      "enum": [
                        "profile",
                        "mcp_gateway",
                        "llm_proxy",
                        "agent"
                      ]
                    },
                    "systemPrompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "incomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "incomingEmailSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "incomingEmailAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "llmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "identityProviderId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "passthroughHeaders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "toolExposureMode": {
                      "type": "string",
                      "enum": [
                        "full",
                        "search_and_run_only"
                      ]
                    },
                    "accessAllTools": {
                      "type": "boolean"
                    },
                    "accessAllSkills": {
                      "type": "boolean"
                    },
                    "accessAllSubagents": {
                      "type": "boolean"
                    },
                    "builtInAgentConfig": {
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "policy-configuration-subagent"
                              ]
                            },
                            "autoConfigureOnToolDiscovery": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "autoConfigureOnToolDiscovery"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-main-agent"
                              ]
                            },
                            "maxRounds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "name",
                            "maxRounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-quarantine-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "context-compaction-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "chat-title-generation-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "app-runtime-llm-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "advisor-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "builtIn": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "delegateToAgentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rawName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "meta": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "clonedPendingDiscovery": {
                            "type": "boolean"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguringStartedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "catalogId",
                          "delegateToAgentId",
                          "name",
                          "rawName",
                          "description",
                          "meta",
                          "clonedPendingDiscovery",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguringStartedAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "knowledgeBaseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suggestedPrompts": {
                      "default": [],
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolvedLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "resolvedLlmModelName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmProviderRequiresPerUserCredential": {
                      "type": "boolean"
                    },
                    "sandboxAvailable": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "slug",
                    "isDefault",
                    "isPersonalGateway",
                    "isPersonalProxy",
                    "considerContextUntrusted",
                    "agentType",
                    "systemPrompt",
                    "description",
                    "icon",
                    "incomingEmailEnabled",
                    "incomingEmailSecurityMode",
                    "incomingEmailAllowedDomain",
                    "llmApiKeyId",
                    "llmModel",
                    "modelId",
                    "identityProviderId",
                    "environmentId",
                    "passthroughHeaders",
                    "toolExposureMode",
                    "accessAllTools",
                    "accessAllSkills",
                    "accessAllSubagents",
                    "builtInAgentConfig",
                    "builtIn",
                    "latestVersion",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tools",
                    "teams",
                    "labels",
                    "knowledgeBaseIds",
                    "connectorIds",
                    "suggestedPrompts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpGateway:read"
          ]
        }
      }
    },
    "/api/llm-proxy/default": {
      "get": {
        "operationId": "getDefaultLlmProxy",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Get default LLM Proxy\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmProxy:read`: View and list LLM proxies",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isPersonalGateway": {
                      "type": "boolean"
                    },
                    "isPersonalProxy": {
                      "type": "boolean"
                    },
                    "considerContextUntrusted": {
                      "type": "boolean"
                    },
                    "agentType": {
                      "type": "string",
                      "enum": [
                        "profile",
                        "mcp_gateway",
                        "llm_proxy",
                        "agent"
                      ]
                    },
                    "systemPrompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "incomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "incomingEmailSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "incomingEmailAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "llmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "identityProviderId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "passthroughHeaders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "toolExposureMode": {
                      "type": "string",
                      "enum": [
                        "full",
                        "search_and_run_only"
                      ]
                    },
                    "accessAllTools": {
                      "type": "boolean"
                    },
                    "accessAllSkills": {
                      "type": "boolean"
                    },
                    "accessAllSubagents": {
                      "type": "boolean"
                    },
                    "builtInAgentConfig": {
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "policy-configuration-subagent"
                              ]
                            },
                            "autoConfigureOnToolDiscovery": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "autoConfigureOnToolDiscovery"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-main-agent"
                              ]
                            },
                            "maxRounds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "name",
                            "maxRounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-quarantine-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "context-compaction-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "chat-title-generation-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "app-runtime-llm-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "advisor-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "builtIn": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "delegateToAgentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rawName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "meta": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "clonedPendingDiscovery": {
                            "type": "boolean"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguringStartedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "catalogId",
                          "delegateToAgentId",
                          "name",
                          "rawName",
                          "description",
                          "meta",
                          "clonedPendingDiscovery",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguringStartedAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "knowledgeBaseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suggestedPrompts": {
                      "default": [],
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolvedLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "resolvedLlmModelName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmProviderRequiresPerUserCredential": {
                      "type": "boolean"
                    },
                    "sandboxAvailable": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "slug",
                    "isDefault",
                    "isPersonalGateway",
                    "isPersonalProxy",
                    "considerContextUntrusted",
                    "agentType",
                    "systemPrompt",
                    "description",
                    "icon",
                    "incomingEmailEnabled",
                    "incomingEmailSecurityMode",
                    "incomingEmailAllowedDomain",
                    "llmApiKeyId",
                    "llmModel",
                    "modelId",
                    "identityProviderId",
                    "environmentId",
                    "passthroughHeaders",
                    "toolExposureMode",
                    "accessAllTools",
                    "accessAllSkills",
                    "accessAllSubagents",
                    "builtInAgentConfig",
                    "builtIn",
                    "latestVersion",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tools",
                    "teams",
                    "labels",
                    "knowledgeBaseIds",
                    "connectorIds",
                    "suggestedPrompts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmProxy:read"
          ]
        }
      }
    },
    "/api/agents/import": {
      "post": {
        "operationId": "importAgent",
        "tags": [
          "Agents"
        ],
        "description": "Import an agent from a portable JSON payload. Creates a new agent with all resolvable associations and returns soft warnings for any references that could not be found.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string",
                    "enum": [
                      "1"
                    ],
                    "description": "Schema version for forward compatibility"
                  },
                  "exportedAt": {
                    "type": "string",
                    "description": "ISO 8601 timestamp"
                  },
                  "sourceInstance": {
                    "description": "Informational: hostname of the source instance",
                    "nullable": true,
                    "type": "string"
                  },
                  "agent": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "agentType": {
                        "type": "string",
                        "enum": [
                          "agent"
                        ],
                        "description": "Only internal agents are exportable"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "systemPrompt": {
                        "nullable": true,
                        "type": "string"
                      },
                      "icon": {
                        "nullable": true,
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ],
                        "description": "Original scope; imports always default to personal"
                      },
                      "considerContextUntrusted": {
                        "type": "boolean"
                      },
                      "toolExposureMode": {
                        "type": "string",
                        "enum": [
                          "full",
                          "search_and_run_only"
                        ]
                      },
                      "accessAllTools": {
                        "default": false,
                        "type": "boolean"
                      },
                      "incomingEmailEnabled": {
                        "type": "boolean"
                      },
                      "incomingEmailSecurityMode": {
                        "type": "string",
                        "enum": [
                          "private",
                          "internal",
                          "public"
                        ]
                      },
                      "incomingEmailAllowedDomain": {
                        "nullable": true,
                        "type": "string"
                      },
                      "passthroughHeaders": {
                        "nullable": true,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9-]+$"
                        }
                      }
                    },
                    "required": [
                      "name",
                      "agentType",
                      "description",
                      "systemPrompt",
                      "icon",
                      "scope",
                      "considerContextUntrusted",
                      "toolExposureMode",
                      "incomingEmailEnabled",
                      "incomingEmailSecurityMode",
                      "incomingEmailAllowedDomain"
                    ]
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  },
                  "suggestedPrompts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "summaryTitle": {
                          "type": "string"
                        },
                        "prompt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "summaryTitle",
                        "prompt"
                      ]
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "toolName": {
                          "type": "string",
                          "description": "Tool name as registered in the MCP catalog"
                        },
                        "catalogName": {
                          "nullable": true,
                          "description": "MCP catalog item name (null for proxy-sniffed tools)",
                          "type": "string"
                        },
                        "credentialResolutionMode": {
                          "description": "How credentials are resolved for this tool assignment",
                          "type": "string",
                          "enum": [
                            "static",
                            "dynamic",
                            "enterprise_managed"
                          ]
                        }
                      },
                      "required": [
                        "toolName",
                        "catalogName"
                      ]
                    }
                  },
                  "delegations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "targetAgentName": {
                          "type": "string",
                          "description": "Name of the target agent for delegation"
                        }
                      },
                      "required": [
                        "targetAgentName"
                      ]
                    }
                  },
                  "knowledgeBases": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Knowledge base name"
                        }
                      },
                      "required": [
                        "name"
                      ]
                    }
                  },
                  "connectors": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Connector name"
                        },
                        "connectorType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "jira"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "confluence"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "github"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "gitlab"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "servicenow"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "notion"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "sharepoint"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "gdrive"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "dropbox"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "onedrive"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "asana"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "linear"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "outline"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "salesforce"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "web_crawler"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "perforce"
                              ]
                            },
                            {
                              "type": "string",
                              "enum": [
                                "mfiles"
                              ]
                            }
                          ],
                          "description": "Connector type (e.g. confluence, github)"
                        }
                      },
                      "required": [
                        "name",
                        "connectorType"
                      ]
                    }
                  }
                },
                "required": [
                  "version",
                  "exportedAt",
                  "agent",
                  "labels",
                  "suggestedPrompts",
                  "tools",
                  "delegations",
                  "knowledgeBases",
                  "connectors"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "authorId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "scope": {
                          "type": "string",
                          "enum": [
                            "personal",
                            "team",
                            "org"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "nullable": true,
                          "type": "string"
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "isPersonalGateway": {
                          "type": "boolean"
                        },
                        "isPersonalProxy": {
                          "type": "boolean"
                        },
                        "considerContextUntrusted": {
                          "type": "boolean"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "description": {
                          "nullable": true,
                          "type": "string"
                        },
                        "icon": {
                          "nullable": true,
                          "type": "string"
                        },
                        "incomingEmailEnabled": {
                          "type": "boolean"
                        },
                        "incomingEmailSecurityMode": {
                          "type": "string",
                          "enum": [
                            "private",
                            "internal",
                            "public"
                          ]
                        },
                        "incomingEmailAllowedDomain": {
                          "nullable": true,
                          "type": "string"
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "llmModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "modelId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "identityProviderId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughHeaders": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "accessAllTools": {
                          "type": "boolean"
                        },
                        "accessAllSkills": {
                          "type": "boolean"
                        },
                        "accessAllSubagents": {
                          "type": "boolean"
                        },
                        "builtInAgentConfig": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "policy-configuration-subagent"
                                  ]
                                },
                                "autoConfigureOnToolDiscovery": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name",
                                "autoConfigureOnToolDiscovery"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "dual-llm-main-agent"
                                  ]
                                },
                                "maxRounds": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 20
                                }
                              },
                              "required": [
                                "name",
                                "maxRounds"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "dual-llm-quarantine-agent"
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "context-compaction-subagent"
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "chat-title-generation-subagent"
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "app-runtime-llm-agent"
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "enum": [
                                    "advisor-agent"
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "builtIn": {
                          "nullable": true,
                          "type": "boolean"
                        },
                        "latestVersion": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "deletedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "agentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "catalogId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "delegateToAgentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "name": {
                                "type": "string"
                              },
                              "rawName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "parameters": {
                                "anyOf": [
                                  {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "description": {
                                "nullable": true,
                                "type": "string"
                              },
                              "meta": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "string",
                                        "nullable": true,
                                        "enum": [
                                          null
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "array",
                                    "items": {}
                                  }
                                ]
                              },
                              "clonedPendingDiscovery": {
                                "type": "boolean"
                              },
                              "policiesAutoConfiguredAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time"
                              },
                              "policiesAutoConfiguringStartedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time"
                              },
                              "policiesAutoConfiguredReasoning": {
                                "nullable": true,
                                "type": "string"
                              },
                              "policiesAutoConfiguredModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "deletedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "agentId",
                              "catalogId",
                              "delegateToAgentId",
                              "name",
                              "rawName",
                              "description",
                              "meta",
                              "clonedPendingDiscovery",
                              "policiesAutoConfiguredAt",
                              "policiesAutoConfiguringStartedAt",
                              "policiesAutoConfiguredReasoning",
                              "policiesAutoConfiguredModel",
                              "createdAt",
                              "updatedAt",
                              "deletedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "teams": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "users": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "email"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "labels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "minLength": 1
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1
                              },
                              "keyId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "valueId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              }
                            },
                            "required": [
                              "key",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "authorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authorEmail": {
                          "nullable": true,
                          "type": "string"
                        },
                        "knowledgeBaseIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "connectorIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "suggestedPrompts": {
                          "default": [],
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "summaryTitle": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              },
                              "prompt": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 5000
                              }
                            },
                            "required": [
                              "summaryTitle",
                              "prompt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "resolvedLlmProvider": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "openai",
                            "gemini",
                            "anthropic",
                            "bedrock",
                            "cohere",
                            "cerebras",
                            "mistral",
                            "perplexity",
                            "groq",
                            "xai",
                            "openrouter",
                            "vllm",
                            "ollama",
                            "ollama-native",
                            "zhipuai",
                            "deepseek",
                            "minimax",
                            "kimi",
                            "azure",
                            "github-copilot",
                            "microsoft-365-copilot",
                            "archestra"
                          ]
                        },
                        "resolvedLlmModelName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "llmProviderRequiresPerUserCredential": {
                          "type": "boolean"
                        },
                        "sandboxAvailable": {
                          "type": "boolean"
                        },
                        "lastUsedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "organizationId",
                        "authorId",
                        "scope",
                        "name",
                        "slug",
                        "isDefault",
                        "isPersonalGateway",
                        "isPersonalProxy",
                        "considerContextUntrusted",
                        "agentType",
                        "systemPrompt",
                        "description",
                        "icon",
                        "incomingEmailEnabled",
                        "incomingEmailSecurityMode",
                        "incomingEmailAllowedDomain",
                        "llmApiKeyId",
                        "llmModel",
                        "modelId",
                        "identityProviderId",
                        "environmentId",
                        "passthroughHeaders",
                        "toolExposureMode",
                        "accessAllTools",
                        "accessAllSkills",
                        "accessAllSubagents",
                        "builtInAgentConfig",
                        "builtIn",
                        "latestVersion",
                        "createdAt",
                        "updatedAt",
                        "deletedAt",
                        "tools",
                        "teams",
                        "labels",
                        "knowledgeBaseIds",
                        "connectorIds",
                        "suggestedPrompts"
                      ],
                      "additionalProperties": false
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "tool",
                              "knowledgeBase",
                              "connector",
                              "delegation"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "name",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "agent",
                    "warnings"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}": {
      "get": {
        "operationId": "getAgent",
        "tags": [
          "Agents"
        ],
        "description": "Get agent by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nChecked dynamically based on the target agent's type. `profile` and `agent` require `agent:read`; `mcp_gateway` requires `mcpGateway:read`; `llm_proxy` requires `llmProxy:read`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isPersonalGateway": {
                      "type": "boolean"
                    },
                    "isPersonalProxy": {
                      "type": "boolean"
                    },
                    "considerContextUntrusted": {
                      "type": "boolean"
                    },
                    "agentType": {
                      "type": "string",
                      "enum": [
                        "profile",
                        "mcp_gateway",
                        "llm_proxy",
                        "agent"
                      ]
                    },
                    "systemPrompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "incomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "incomingEmailSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "incomingEmailAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "llmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "identityProviderId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "passthroughHeaders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "toolExposureMode": {
                      "type": "string",
                      "enum": [
                        "full",
                        "search_and_run_only"
                      ]
                    },
                    "accessAllTools": {
                      "type": "boolean"
                    },
                    "accessAllSkills": {
                      "type": "boolean"
                    },
                    "accessAllSubagents": {
                      "type": "boolean"
                    },
                    "builtInAgentConfig": {
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "policy-configuration-subagent"
                              ]
                            },
                            "autoConfigureOnToolDiscovery": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "autoConfigureOnToolDiscovery"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-main-agent"
                              ]
                            },
                            "maxRounds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "name",
                            "maxRounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-quarantine-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "context-compaction-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "chat-title-generation-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "app-runtime-llm-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "advisor-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "builtIn": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "delegateToAgentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rawName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "meta": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "clonedPendingDiscovery": {
                            "type": "boolean"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguringStartedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "catalogId",
                          "delegateToAgentId",
                          "name",
                          "rawName",
                          "description",
                          "meta",
                          "clonedPendingDiscovery",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguringStartedAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "knowledgeBaseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suggestedPrompts": {
                      "default": [],
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolvedLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "resolvedLlmModelName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmProviderRequiresPerUserCredential": {
                      "type": "boolean"
                    },
                    "sandboxAvailable": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "slug",
                    "isDefault",
                    "isPersonalGateway",
                    "isPersonalProxy",
                    "considerContextUntrusted",
                    "agentType",
                    "systemPrompt",
                    "description",
                    "icon",
                    "incomingEmailEnabled",
                    "incomingEmailSecurityMode",
                    "incomingEmailAllowedDomain",
                    "llmApiKeyId",
                    "llmModel",
                    "modelId",
                    "identityProviderId",
                    "environmentId",
                    "passthroughHeaders",
                    "toolExposureMode",
                    "accessAllTools",
                    "accessAllSkills",
                    "accessAllSubagents",
                    "builtInAgentConfig",
                    "builtIn",
                    "latestVersion",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tools",
                    "teams",
                    "labels",
                    "knowledgeBaseIds",
                    "connectorIds",
                    "suggestedPrompts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Checked dynamically based on the target agent's type. `profile` and `agent` require `agent:read`; `mcp_gateway` requires `mcpGateway:read`; `llm_proxy` requires `llmProxy:read`.",
          "permissions": []
        }
      },
      "put": {
        "operationId": "updateAgent",
        "tags": [
          "Agents"
        ],
        "description": "Update an agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nChecked dynamically based on the target agent's type. `profile` and `agent` require `agent:update`; `mcp_gateway` requires `mcpGateway:update`; `llm_proxy` requires `llmProxy:update`. Additional scope and team-admin checks may apply.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organizationId": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "isPersonalProxy": {
                    "type": "boolean"
                  },
                  "considerContextUntrusted": {
                    "type": "boolean"
                  },
                  "agentType": {
                    "type": "string",
                    "enum": [
                      "profile",
                      "mcp_gateway",
                      "llm_proxy",
                      "agent"
                    ]
                  },
                  "systemPrompt": {
                    "nullable": true,
                    "type": "string"
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  },
                  "icon": {
                    "nullable": true,
                    "type": "string"
                  },
                  "incomingEmailEnabled": {
                    "type": "boolean"
                  },
                  "incomingEmailSecurityMode": {
                    "type": "string",
                    "enum": [
                      "private",
                      "internal",
                      "public"
                    ]
                  },
                  "incomingEmailAllowedDomain": {
                    "nullable": true,
                    "type": "string"
                  },
                  "llmApiKeyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "llmModel": {
                    "nullable": true,
                    "type": "string"
                  },
                  "modelId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "identityProviderId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "passthroughHeaders": {
                    "nullable": true,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-zA-Z0-9-]+$"
                    }
                  },
                  "toolExposureMode": {
                    "type": "string",
                    "enum": [
                      "full",
                      "search_and_run_only"
                    ]
                  },
                  "accessAllTools": {
                    "type": "boolean"
                  },
                  "accessAllSubagents": {
                    "type": "boolean"
                  },
                  "builtInAgentConfig": {
                    "nullable": true,
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "policy-configuration-subagent"
                            ]
                          },
                          "autoConfigureOnToolDiscovery": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "name",
                          "autoConfigureOnToolDiscovery"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "dual-llm-main-agent"
                            ]
                          },
                          "maxRounds": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 20
                          }
                        },
                        "required": [
                          "name",
                          "maxRounds"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "dual-llm-quarantine-agent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "context-compaction-subagent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "chat-title-generation-subagent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "app-runtime-llm-agent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "enum": [
                              "advisor-agent"
                            ]
                          }
                        },
                        "required": [
                          "name"
                        ]
                      }
                    ]
                  },
                  "deletedAt": {
                    "nullable": true
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "users": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "keyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "valueId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  },
                  "knowledgeBaseIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "connectorIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "suggestedPrompts": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "summaryTitle": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50
                        },
                        "prompt": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 5000
                        }
                      },
                      "required": [
                        "summaryTitle",
                        "prompt"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isPersonalGateway": {
                      "type": "boolean"
                    },
                    "isPersonalProxy": {
                      "type": "boolean"
                    },
                    "considerContextUntrusted": {
                      "type": "boolean"
                    },
                    "agentType": {
                      "type": "string",
                      "enum": [
                        "profile",
                        "mcp_gateway",
                        "llm_proxy",
                        "agent"
                      ]
                    },
                    "systemPrompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "incomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "incomingEmailSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "incomingEmailAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "llmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "identityProviderId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "passthroughHeaders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "toolExposureMode": {
                      "type": "string",
                      "enum": [
                        "full",
                        "search_and_run_only"
                      ]
                    },
                    "accessAllTools": {
                      "type": "boolean"
                    },
                    "accessAllSkills": {
                      "type": "boolean"
                    },
                    "accessAllSubagents": {
                      "type": "boolean"
                    },
                    "builtInAgentConfig": {
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "policy-configuration-subagent"
                              ]
                            },
                            "autoConfigureOnToolDiscovery": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "autoConfigureOnToolDiscovery"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-main-agent"
                              ]
                            },
                            "maxRounds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "name",
                            "maxRounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-quarantine-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "context-compaction-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "chat-title-generation-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "app-runtime-llm-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "advisor-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "builtIn": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "delegateToAgentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rawName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "meta": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "clonedPendingDiscovery": {
                            "type": "boolean"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguringStartedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "catalogId",
                          "delegateToAgentId",
                          "name",
                          "rawName",
                          "description",
                          "meta",
                          "clonedPendingDiscovery",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguringStartedAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "knowledgeBaseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suggestedPrompts": {
                      "default": [],
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolvedLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "resolvedLlmModelName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmProviderRequiresPerUserCredential": {
                      "type": "boolean"
                    },
                    "sandboxAvailable": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "slug",
                    "isDefault",
                    "isPersonalGateway",
                    "isPersonalProxy",
                    "considerContextUntrusted",
                    "agentType",
                    "systemPrompt",
                    "description",
                    "icon",
                    "incomingEmailEnabled",
                    "incomingEmailSecurityMode",
                    "incomingEmailAllowedDomain",
                    "llmApiKeyId",
                    "llmModel",
                    "modelId",
                    "identityProviderId",
                    "environmentId",
                    "passthroughHeaders",
                    "toolExposureMode",
                    "accessAllTools",
                    "accessAllSkills",
                    "accessAllSubagents",
                    "builtInAgentConfig",
                    "builtIn",
                    "latestVersion",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tools",
                    "teams",
                    "labels",
                    "knowledgeBaseIds",
                    "connectorIds",
                    "suggestedPrompts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Checked dynamically based on the target agent's type. `profile` and `agent` require `agent:update`; `mcp_gateway` requires `mcpGateway:update`; `llm_proxy` requires `llmProxy:update`. Additional scope and team-admin checks may apply.",
          "permissions": []
        }
      },
      "delete": {
        "operationId": "deleteAgent",
        "tags": [
          "Agents"
        ],
        "description": "Delete an agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nChecked dynamically based on the target agent's type. `profile` and `agent` require `agent:delete`; `mcp_gateway` requires `mcpGateway:delete`; `llm_proxy` requires `llmProxy:delete`. Additional scope checks may apply.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Checked dynamically based on the target agent's type. `profile` and `agent` require `agent:delete`; `mcp_gateway` requires `mcpGateway:delete`; `llm_proxy` requires `llmProxy:delete`. Additional scope checks may apply.",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/versions": {
      "get": {
        "operationId": "getAgentVersions",
        "tags": [
          "Agents"
        ],
        "description": "List an agent's config version history, newest first, as metadata only (no snapshot). Retention keeps the last 100 versions, so the oldest listed version may be greater than 1.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "contentHash": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "version",
                          "contentHash",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/versions/{version}": {
      "get": {
        "operationId": "getAgentVersion",
        "tags": [
          "Agents"
        ],
        "description": "Get one immutable agent config version (full snapshot; key material is never captured). Versions dropped by retention are 404.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "integer",
              "exclusiveMinimum": true,
              "maximum": 2147483647
            },
            "in": "path",
            "name": "version",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "snapshot": {
                      "type": "object",
                      "properties": {
                        "agentType": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "nullable": true,
                          "type": "string"
                        },
                        "icon": {
                          "nullable": true,
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "considerContextUntrusted": {
                          "type": "boolean"
                        },
                        "toolExposureMode": {
                          "type": "string"
                        },
                        "accessAllTools": {
                          "type": "boolean"
                        },
                        "accessAllSubagents": {
                          "type": "boolean"
                        },
                        "passthroughHeaders": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "incomingEmailEnabled": {
                          "type": "boolean"
                        },
                        "incomingEmailSecurityMode": {
                          "type": "string"
                        },
                        "incomingEmailAllowedDomain": {
                          "nullable": true,
                          "type": "string"
                        },
                        "builtInAgentConfig": {},
                        "model": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "externalId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "externalId"
                          ],
                          "additionalProperties": false
                        },
                        "llmApiKey": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "provider": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "provider"
                          ],
                          "additionalProperties": false
                        },
                        "identityProviderId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "mcpServerId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "credentialResolutionMode": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolId",
                              "name",
                              "mcpServerId",
                              "credentialResolutionMode"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "excludedTools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolId",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "excludedSubagents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "agentId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "agentId",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "suggestedPrompts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "summaryTitle": {
                                "type": "string"
                              },
                              "prompt": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "summaryTitle",
                              "prompt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "hooks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "event": {
                                "type": "string"
                              },
                              "fileName": {
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              },
                              "requirements": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "enabled": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "event",
                              "fileName",
                              "content",
                              "requirements",
                              "enabled"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "knowledgeBases": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "agentType",
                        "name",
                        "description",
                        "icon",
                        "systemPrompt",
                        "considerContextUntrusted",
                        "toolExposureMode",
                        "accessAllTools",
                        "accessAllSubagents",
                        "passthroughHeaders",
                        "incomingEmailEnabled",
                        "incomingEmailSecurityMode",
                        "incomingEmailAllowedDomain",
                        "builtInAgentConfig",
                        "model",
                        "llmApiKey",
                        "identityProviderId",
                        "environmentId",
                        "tools",
                        "excludedTools",
                        "excludedSubagents",
                        "suggestedPrompts",
                        "hooks",
                        "knowledgeBases",
                        "connectors"
                      ],
                      "additionalProperties": false
                    },
                    "contentHash": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "agentId",
                    "version",
                    "snapshot",
                    "contentHash",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/versions/{version}/restore": {
      "post": {
        "operationId": "restoreAgentVersion",
        "tags": [
          "Agents"
        ],
        "description": "Restore an agent's config to an earlier version by replaying its snapshot forward as a new head version — history is never rewritten. All-or-nothing: the restore is validated in full before anything is written, and a version referencing something that no longer exists or is out of the caller's reach (a deleted tool, key or knowledge source) is rejected with 400 rather than partially applied. Only differences from the agent's live config are written, so restoring the current configuration is a no-op. Retrying is safe: the source version is immutable, and the pre-restore config is forked as a version before anything is written.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "baseVersion": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "integer",
              "exclusiveMinimum": true,
              "maximum": 2147483647
            },
            "in": "path",
            "name": "version",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isPersonalGateway": {
                      "type": "boolean"
                    },
                    "isPersonalProxy": {
                      "type": "boolean"
                    },
                    "considerContextUntrusted": {
                      "type": "boolean"
                    },
                    "agentType": {
                      "type": "string",
                      "enum": [
                        "profile",
                        "mcp_gateway",
                        "llm_proxy",
                        "agent"
                      ]
                    },
                    "systemPrompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "incomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "incomingEmailSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "incomingEmailAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "llmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "identityProviderId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "passthroughHeaders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "toolExposureMode": {
                      "type": "string",
                      "enum": [
                        "full",
                        "search_and_run_only"
                      ]
                    },
                    "accessAllTools": {
                      "type": "boolean"
                    },
                    "accessAllSkills": {
                      "type": "boolean"
                    },
                    "accessAllSubagents": {
                      "type": "boolean"
                    },
                    "builtInAgentConfig": {
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "policy-configuration-subagent"
                              ]
                            },
                            "autoConfigureOnToolDiscovery": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "autoConfigureOnToolDiscovery"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-main-agent"
                              ]
                            },
                            "maxRounds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "name",
                            "maxRounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-quarantine-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "context-compaction-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "chat-title-generation-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "app-runtime-llm-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "advisor-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "builtIn": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "delegateToAgentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rawName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "meta": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "clonedPendingDiscovery": {
                            "type": "boolean"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguringStartedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "catalogId",
                          "delegateToAgentId",
                          "name",
                          "rawName",
                          "description",
                          "meta",
                          "clonedPendingDiscovery",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguringStartedAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "knowledgeBaseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suggestedPrompts": {
                      "default": [],
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolvedLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "resolvedLlmModelName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmProviderRequiresPerUserCredential": {
                      "type": "boolean"
                    },
                    "sandboxAvailable": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "slug",
                    "isDefault",
                    "isPersonalGateway",
                    "isPersonalProxy",
                    "considerContextUntrusted",
                    "agentType",
                    "systemPrompt",
                    "description",
                    "icon",
                    "incomingEmailEnabled",
                    "incomingEmailSecurityMode",
                    "incomingEmailAllowedDomain",
                    "llmApiKeyId",
                    "llmModel",
                    "modelId",
                    "identityProviderId",
                    "environmentId",
                    "passthroughHeaders",
                    "toolExposureMode",
                    "accessAllTools",
                    "accessAllSkills",
                    "accessAllSubagents",
                    "builtInAgentConfig",
                    "builtIn",
                    "latestVersion",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tools",
                    "teams",
                    "labels",
                    "knowledgeBaseIds",
                    "connectorIds",
                    "suggestedPrompts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/clone": {
      "post": {
        "operationId": "cloneAgent",
        "tags": [
          "Agents"
        ],
        "description": "Clone an agent and all its associations. Optionally override the clone's visibility (scope/teams); by default the source's visibility is copied.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "scope": {
                    "description": "Visibility of the clone. Defaults to the source agent's scope.",
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teams": {
                    "description": "Teams for a team-scoped clone. Defaults to the source agent's teams. Ignored unless the clone's scope resolves to 'team'.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isPersonalGateway": {
                      "type": "boolean"
                    },
                    "isPersonalProxy": {
                      "type": "boolean"
                    },
                    "considerContextUntrusted": {
                      "type": "boolean"
                    },
                    "agentType": {
                      "type": "string",
                      "enum": [
                        "profile",
                        "mcp_gateway",
                        "llm_proxy",
                        "agent"
                      ]
                    },
                    "systemPrompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "incomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "incomingEmailSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "incomingEmailAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "llmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "identityProviderId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "passthroughHeaders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "toolExposureMode": {
                      "type": "string",
                      "enum": [
                        "full",
                        "search_and_run_only"
                      ]
                    },
                    "accessAllTools": {
                      "type": "boolean"
                    },
                    "accessAllSkills": {
                      "type": "boolean"
                    },
                    "accessAllSubagents": {
                      "type": "boolean"
                    },
                    "builtInAgentConfig": {
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "policy-configuration-subagent"
                              ]
                            },
                            "autoConfigureOnToolDiscovery": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "autoConfigureOnToolDiscovery"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-main-agent"
                              ]
                            },
                            "maxRounds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "name",
                            "maxRounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-quarantine-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "context-compaction-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "chat-title-generation-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "app-runtime-llm-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "advisor-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "builtIn": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "delegateToAgentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rawName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "meta": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "clonedPendingDiscovery": {
                            "type": "boolean"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguringStartedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "catalogId",
                          "delegateToAgentId",
                          "name",
                          "rawName",
                          "description",
                          "meta",
                          "clonedPendingDiscovery",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguringStartedAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "knowledgeBaseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suggestedPrompts": {
                      "default": [],
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolvedLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "resolvedLlmModelName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmProviderRequiresPerUserCredential": {
                      "type": "boolean"
                    },
                    "sandboxAvailable": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "slug",
                    "isDefault",
                    "isPersonalGateway",
                    "isPersonalProxy",
                    "considerContextUntrusted",
                    "agentType",
                    "systemPrompt",
                    "description",
                    "icon",
                    "incomingEmailEnabled",
                    "incomingEmailSecurityMode",
                    "incomingEmailAllowedDomain",
                    "llmApiKeyId",
                    "llmModel",
                    "modelId",
                    "identityProviderId",
                    "environmentId",
                    "passthroughHeaders",
                    "toolExposureMode",
                    "accessAllTools",
                    "accessAllSkills",
                    "accessAllSubagents",
                    "builtInAgentConfig",
                    "builtIn",
                    "latestVersion",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tools",
                    "teams",
                    "labels",
                    "knowledgeBaseIds",
                    "connectorIds",
                    "suggestedPrompts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/export": {
      "get": {
        "operationId": "exportAgent",
        "tags": [
          "Agents"
        ],
        "description": "Export an agent configuration as a portable JSON payload for cross-instance transfer\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string",
                      "enum": [
                        "1"
                      ],
                      "description": "Schema version for forward compatibility"
                    },
                    "exportedAt": {
                      "type": "string",
                      "description": "ISO 8601 timestamp"
                    },
                    "sourceInstance": {
                      "description": "Informational: hostname of the source instance",
                      "nullable": true,
                      "type": "string"
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "agent"
                          ],
                          "description": "Only internal agents are exportable"
                        },
                        "description": {
                          "nullable": true,
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "icon": {
                          "nullable": true,
                          "type": "string"
                        },
                        "scope": {
                          "type": "string",
                          "enum": [
                            "personal",
                            "team",
                            "org"
                          ],
                          "description": "Original scope; imports always default to personal"
                        },
                        "considerContextUntrusted": {
                          "type": "boolean"
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "accessAllTools": {
                          "default": false,
                          "type": "boolean"
                        },
                        "incomingEmailEnabled": {
                          "type": "boolean"
                        },
                        "incomingEmailSecurityMode": {
                          "type": "string",
                          "enum": [
                            "private",
                            "internal",
                            "public"
                          ]
                        },
                        "incomingEmailAllowedDomain": {
                          "nullable": true,
                          "type": "string"
                        },
                        "passthroughHeaders": {
                          "nullable": true,
                          "maxItems": 20,
                          "type": "array",
                          "items": {}
                        }
                      },
                      "required": [
                        "name",
                        "agentType",
                        "description",
                        "systemPrompt",
                        "icon",
                        "scope",
                        "considerContextUntrusted",
                        "toolExposureMode",
                        "accessAllTools",
                        "incomingEmailEnabled",
                        "incomingEmailSecurityMode",
                        "incomingEmailAllowedDomain"
                      ],
                      "additionalProperties": false
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "suggestedPrompts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "toolName": {
                            "type": "string",
                            "description": "Tool name as registered in the MCP catalog"
                          },
                          "catalogName": {
                            "nullable": true,
                            "description": "MCP catalog item name (null for proxy-sniffed tools)",
                            "type": "string"
                          },
                          "credentialResolutionMode": {
                            "description": "How credentials are resolved for this tool assignment",
                            "type": "string",
                            "enum": [
                              "static",
                              "dynamic",
                              "enterprise_managed"
                            ]
                          }
                        },
                        "required": [
                          "toolName",
                          "catalogName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "delegations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "targetAgentName": {
                            "type": "string",
                            "description": "Name of the target agent for delegation"
                          }
                        },
                        "required": [
                          "targetAgentName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "knowledgeBases": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Knowledge base name"
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Connector name"
                          },
                          "connectorType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "jira"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "confluence"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "github"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "gitlab"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "servicenow"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "notion"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "sharepoint"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "gdrive"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "dropbox"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "onedrive"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "asana"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "linear"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "outline"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "salesforce"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "web_crawler"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "perforce"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "mfiles"
                                ]
                              }
                            ],
                            "description": "Connector type (e.g. confluence, github)"
                          }
                        },
                        "required": [
                          "name",
                          "connectorType"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "version",
                    "exportedAt",
                    "agent",
                    "labels",
                    "suggestedPrompts",
                    "tools",
                    "delegations",
                    "knowledgeBases",
                    "connectors"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/tool-exclusions": {
      "get": {
        "operationId": "getAgentToolExclusions",
        "tags": [
          "Agents"
        ],
        "description": "Get the agent's Auto-tool-mode exclusions: MCP catalogs and individual tools removed from its tool surface while 'access all tools' is on\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "excludedToolIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": "Individual tool IDs excluded from the agent's surface"
                    }
                  },
                  "required": [
                    "excludedToolIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      },
      "put": {
        "operationId": "updateAgentToolExclusions",
        "tags": [
          "Agents"
        ],
        "description": "Replace the agent's Auto-tool-mode exclusions (full replace of the excluded tool set)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "excludedToolIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "description": "Individual tool IDs excluded from the agent's surface"
                  }
                },
                "required": [
                  "excludedToolIds"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "excludedToolIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": "Individual tool IDs excluded from the agent's surface"
                    }
                  },
                  "required": [
                    "excludedToolIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/subagent-exclusions": {
      "get": {
        "operationId": "getAgentSubagentExclusions",
        "tags": [
          "Agents"
        ],
        "description": "Get the agent's Auto-subagent-mode exclusions: delegation target agents removed from its Auto delegation surface while 'access all subagents' is on\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "excludedSubagentIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": "Target agent IDs excluded from the agent's Auto delegation surface"
                    }
                  },
                  "required": [
                    "excludedSubagentIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      },
      "put": {
        "operationId": "updateAgentSubagentExclusions",
        "tags": [
          "Agents"
        ],
        "description": "Replace the agent's Auto-subagent-mode exclusions (full replace of the excluded delegation-target set)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "excludedSubagentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "description": "Target agent IDs excluded from the agent's Auto delegation surface"
                  }
                },
                "required": [
                  "excludedSubagentIds"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "excludedSubagentIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": "Target agent IDs excluded from the agent's Auto delegation surface"
                    }
                  },
                  "required": [
                    "excludedSubagentIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/skills": {
      "get": {
        "operationId": "getAgentSkills",
        "tags": [
          "Agents"
        ],
        "description": "Get the skills this gateway publishes over MCP: the explicitly assigned set, plus whether Auto mode ('access all skills') is on\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accessAllSkills": {
                      "type": "boolean",
                      "description": "Auto mode: expose every org-scoped skill visible in the agent's environment"
                    },
                    "skillIds": {
                      "maxItems": 1000,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": "Skills explicitly assigned to the agent (Custom mode)"
                    },
                    "skills": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "templated": {
                            "type": "boolean"
                          },
                          "agentName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "authorId": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "scope",
                          "templated",
                          "agentName",
                          "authorId"
                        ],
                        "additionalProperties": false
                      },
                      "description": "The assigned skills themselves, in `skillIds` order"
                    }
                  },
                  "required": [
                    "accessAllSkills",
                    "skillIds",
                    "skills"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      },
      "put": {
        "operationId": "updateAgentSkills",
        "tags": [
          "Agents"
        ],
        "description": "Replace the skills this gateway publishes over MCP (full replace of the assigned set) and set Auto mode\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accessAllSkills": {
                    "type": "boolean",
                    "description": "Auto mode: expose every org-scoped skill visible in the agent's environment"
                  },
                  "skillIds": {
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "description": "Skills explicitly assigned to the agent (Custom mode)"
                  }
                },
                "required": [
                  "accessAllSkills",
                  "skillIds"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accessAllSkills": {
                      "type": "boolean",
                      "description": "Auto mode: expose every org-scoped skill visible in the agent's environment"
                    },
                    "skillIds": {
                      "maxItems": 1000,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": "Skills explicitly assigned to the agent (Custom mode)"
                    },
                    "skills": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "templated": {
                            "type": "boolean"
                          },
                          "agentName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "authorId": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "scope",
                          "templated",
                          "agentName",
                          "authorId"
                        ],
                        "additionalProperties": false
                      },
                      "description": "The assigned skills themselves, in `skillIds` order"
                    }
                  },
                  "required": [
                    "accessAllSkills",
                    "skillIds",
                    "skills"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/agents/{id}/skill-exclusions": {
      "get": {
        "operationId": "getAgentSkillExclusions",
        "tags": [
          "Agents"
        ],
        "description": "Get the agent's Auto-skill-mode exclusions: skills removed from its published skill surface while 'access all skills' is on\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "excludedSkillIds": {
                      "maxItems": 1000,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": "Individual skill IDs excluded from the agent's skill surface"
                    },
                    "skills": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "templated": {
                            "type": "boolean"
                          },
                          "agentName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "authorId": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "scope",
                          "templated",
                          "agentName",
                          "authorId"
                        ],
                        "additionalProperties": false
                      },
                      "description": "The excluded skills themselves, in `excludedSkillIds` order"
                    }
                  },
                  "required": [
                    "excludedSkillIds",
                    "skills"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      },
      "put": {
        "operationId": "updateAgentSkillExclusions",
        "tags": [
          "Agents"
        ],
        "description": "Replace the agent's Auto-skill-mode exclusions (full replace of the excluded skill set)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "excludedSkillIds": {
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "description": "Individual skill IDs excluded from the agent's skill surface"
                  }
                },
                "required": [
                  "excludedSkillIds"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "excludedSkillIds": {
                      "maxItems": 1000,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": "Individual skill IDs excluded from the agent's skill surface"
                    },
                    "skills": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "templated": {
                            "type": "boolean"
                          },
                          "agentName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "authorId": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "scope",
                          "templated",
                          "agentName",
                          "authorId"
                        ],
                        "additionalProperties": false
                      },
                      "description": "The excluded skills themselves, in `excludedSkillIds` order"
                    }
                  },
                  "required": [
                    "excludedSkillIds",
                    "skills"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/agents/{id}/restore": {
      "post": {
        "operationId": "restoreAgent",
        "tags": [
          "Agents"
        ],
        "description": "Restore a soft-deleted agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nChecked dynamically based on the target agent's type. `profile` and `agent` require `agent:delete`; `mcp_gateway` requires `mcpGateway:delete`; `llm_proxy` requires `llmProxy:delete`. Additional scope checks may apply.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "isPersonalGateway": {
                      "type": "boolean"
                    },
                    "isPersonalProxy": {
                      "type": "boolean"
                    },
                    "considerContextUntrusted": {
                      "type": "boolean"
                    },
                    "agentType": {
                      "type": "string",
                      "enum": [
                        "profile",
                        "mcp_gateway",
                        "llm_proxy",
                        "agent"
                      ]
                    },
                    "systemPrompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "incomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "incomingEmailSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "incomingEmailAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "llmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "identityProviderId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "passthroughHeaders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "toolExposureMode": {
                      "type": "string",
                      "enum": [
                        "full",
                        "search_and_run_only"
                      ]
                    },
                    "accessAllTools": {
                      "type": "boolean"
                    },
                    "accessAllSkills": {
                      "type": "boolean"
                    },
                    "accessAllSubagents": {
                      "type": "boolean"
                    },
                    "builtInAgentConfig": {
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "policy-configuration-subagent"
                              ]
                            },
                            "autoConfigureOnToolDiscovery": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "autoConfigureOnToolDiscovery"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-main-agent"
                              ]
                            },
                            "maxRounds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            }
                          },
                          "required": [
                            "name",
                            "maxRounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "dual-llm-quarantine-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "context-compaction-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "chat-title-generation-subagent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "app-runtime-llm-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "advisor-agent"
                              ]
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "builtIn": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "delegateToAgentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "rawName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "meta": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "clonedPendingDiscovery": {
                            "type": "boolean"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguringStartedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "catalogId",
                          "delegateToAgentId",
                          "name",
                          "rawName",
                          "description",
                          "meta",
                          "clonedPendingDiscovery",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguringStartedAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "knowledgeBaseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "suggestedPrompts": {
                      "default": [],
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "summaryTitle": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          },
                          "prompt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 5000
                          }
                        },
                        "required": [
                          "summaryTitle",
                          "prompt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "resolvedLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "resolvedLlmModelName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "llmProviderRequiresPerUserCredential": {
                      "type": "boolean"
                    },
                    "sandboxAvailable": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "slug",
                    "isDefault",
                    "isPersonalGateway",
                    "isPersonalProxy",
                    "considerContextUntrusted",
                    "agentType",
                    "systemPrompt",
                    "description",
                    "icon",
                    "incomingEmailEnabled",
                    "incomingEmailSecurityMode",
                    "incomingEmailAllowedDomain",
                    "llmApiKeyId",
                    "llmModel",
                    "modelId",
                    "identityProviderId",
                    "environmentId",
                    "passthroughHeaders",
                    "toolExposureMode",
                    "accessAllTools",
                    "accessAllSkills",
                    "accessAllSubagents",
                    "builtInAgentConfig",
                    "builtIn",
                    "latestVersion",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tools",
                    "teams",
                    "labels",
                    "knowledgeBaseIds",
                    "connectorIds",
                    "suggestedPrompts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Checked dynamically based on the target agent's type. `profile` and `agent` require `agent:delete`; `mcp_gateway` requires `mcpGateway:delete`; `llm_proxy` requires `llmProxy:delete`. Additional scope checks may apply.",
          "permissions": []
        }
      }
    },
    "/api/agents/{id}/permanent": {
      "delete": {
        "operationId": "permanentlyDeleteAgent",
        "tags": [
          "Agents"
        ],
        "description": "Permanently destroy a soft-deleted agent. Global admins only — an `agent:delete` or `agent:admin` grant reaches the trash, not past it. Irreversible, with no grace period: the agent's configuration and scheduled runs are destroyed, and it is cleared from the organization, /connection, and member defaults. Its history survives, detached — conversations and LLM usage rows are kept and simply stop pointing at it. 404 if there is no soft-deleted agent with that id in the org, which is also the answer when the agent is still live or the caller is not a global admin. Restore wins a race. Purging a high-traffic LLM proxy detaches millions of usage rows in one transaction and can take minutes; past five it is abandoned and the agent stays in the trash, unharmed.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nRestricted to the built-in Admin and Platform Admin roles. No permission grants it: `agent:delete` and even `agent:admin` reach the trash, not past it, and a service account never qualifies. A caller without it gets 404, not 403, so the endpoint never confirms the agent exists.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Restricted to the built-in Admin and Platform Admin roles. No permission grants it: `agent:delete` and even `agent:admin` reach the trash, not past it, and a service account never qualifies. A caller without it gets 404, not 403, so the endpoint never confirms the agent exists.",
          "permissions": []
        }
      }
    },
    "/api/agents/labels/keys": {
      "get": {
        "operationId": "getLabelKeys",
        "tags": [
          "Agents"
        ],
        "description": "Get all available label keys\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/labels/values": {
      "get": {
        "operationId": "getLabelValues",
        "tags": [
          "Agents"
        ],
        "description": "Get all available label values\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "key",
            "required": false,
            "description": "Filter values by label key"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/members/default-agent": {
      "get": {
        "operationId": "getMemberDefaultAgent",
        "tags": [
          "Members"
        ],
        "description": "Get the current user's default agent ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "required": [
                    "defaultAgentId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/members/default-model": {
      "get": {
        "operationId": "getMemberDefaultModel",
        "tags": [
          "Members"
        ],
        "description": "Get the current user's default model and API key\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "required": [
                    "modelId",
                    "chatApiKeyId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      },
      "put": {
        "operationId": "updateMemberDefaultModel",
        "tags": [
          "Members"
        ],
        "description": "Set the current user's default model and API key\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "chatApiKeyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "modelId",
                  "chatApiKeyId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "required": [
                    "modelId",
                    "chatApiKeyId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agent-tools": {
      "get": {
        "operationId": "getAllAgentTools",
        "tags": [
          "Agent Tools"
        ],
        "description": "Get all agent-tool relationships with pagination, sorting, and filtering\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "agent",
                "origin",
                "createdAt"
              ]
            },
            "in": "query",
            "name": "sortBy",
            "required": false
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "agentId",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "origin",
            "required": false,
            "description": "A catalogId to filter by"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "mcpServerOwnerId",
            "required": false,
            "description": "Filter by MCP server owner user ID"
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "excludeArchestraTools",
            "required": false,
            "description": "For test isolation"
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "skipPagination",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "mcpServerId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "credentialResolutionMode": {
                            "type": "string",
                            "enum": [
                              "static",
                              "dynamic",
                              "enterprise_managed"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "agent": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "tool": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "nullable": true,
                                "type": "string"
                              },
                              "parameters": {
                                "anyOf": [
                                  {
                                    "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "catalogId": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "description",
                              "createdAt",
                              "updatedAt",
                              "catalogId"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "mcpServerId",
                          "credentialResolutionMode",
                          "createdAt",
                          "updatedAt",
                          "agent",
                          "tool"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      }
    },
    "/api/agents/{agentId}/tools/{toolId}": {
      "post": {
        "operationId": "assignToolToAgent",
        "tags": [
          "Agent Tools"
        ],
        "description": "Assign a tool to an agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "resolveAtCallTime": {
                    "type": "boolean"
                  },
                  "credentialResolutionMode": {
                    "type": "string",
                    "enum": [
                      "static",
                      "dynamic",
                      "enterprise_managed"
                    ]
                  },
                  "mcpServerId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "toolId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      },
      "delete": {
        "operationId": "unassignToolFromAgent",
        "tags": [
          "Agent Tools"
        ],
        "description": "Unassign a tool from an agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "toolId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/tools/bulk-assign": {
      "post": {
        "operationId": "bulkAssignTools",
        "tags": [
          "Agent Tools"
        ],
        "description": "Assign multiple tools to multiple agents in bulk\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assignments": {
                    "maxItems": 5000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "toolId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "resolveAtCallTime": {
                          "type": "boolean"
                        },
                        "credentialResolutionMode": {
                          "type": "string",
                          "enum": [
                            "static",
                            "dynamic",
                            "enterprise_managed"
                          ]
                        },
                        "mcpServerId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "agentId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "toolId",
                        "agentId"
                      ]
                    }
                  }
                },
                "required": [
                  "assignments"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "succeeded": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentId",
                          "toolId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string"
                          },
                          "error": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentId",
                          "toolId",
                          "error"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "duplicates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentId",
                          "toolId"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "succeeded",
                    "failed",
                    "duplicates"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/tools/bulk-update": {
      "post": {
        "operationId": "bulkUpdateAgentTools",
        "tags": [
          "Agent Tools"
        ],
        "description": "Apply a batch of tool assignments and removals across agents in one request. Intended for editors that save a whole tool selection at once: the batch produces a single config version per affected agent instead of one per tool. If the same agent/tool pair appears in both lists, the assignment wins and the removal is ignored. A pair repeated within a list is written once but reported once per occurrence. Agents the caller cannot modify are reported two different ways: an agent that belongs to another organization or no longer exists is reported per entry in `failed`, and the rest of the batch still applies; an agent in the caller's own organization whose agent type the caller lacks `update` on rejects the entire request with 403 and applies nothing.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assignments": {
                    "default": [],
                    "maxItems": 5000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "toolId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "resolveAtCallTime": {
                          "type": "boolean"
                        },
                        "credentialResolutionMode": {
                          "type": "string",
                          "enum": [
                            "static",
                            "dynamic",
                            "enterprise_managed"
                          ]
                        },
                        "mcpServerId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "agentId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "toolId",
                        "agentId"
                      ]
                    }
                  },
                  "removals": {
                    "default": [],
                    "maxItems": 5000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "agentId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "toolId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "agentId",
                        "toolId"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "succeeded": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentId",
                          "toolId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string"
                          },
                          "error": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentId",
                          "toolId",
                          "error"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "duplicates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentId",
                          "toolId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "removed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentId",
                          "toolId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "notAssigned": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "agentId",
                          "toolId"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "succeeded",
                    "failed",
                    "duplicates",
                    "removed",
                    "notAssigned"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agent-tools/auto-configure-policies": {
      "post": {
        "operationId": "autoConfigureAgentToolPolicies",
        "tags": [
          "Agent Tools"
        ],
        "description": "Automatically configure security policies for tools using LLM analysis\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:update`: Modify tools, tool configuration, and security policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toolIds": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "toolIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "toolId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "success": {
                            "type": "boolean"
                          },
                          "config": {
                            "type": "object",
                            "properties": {
                              "toolInvocationAction": {
                                "type": "string",
                                "enum": [
                                  "allow_when_context_is_sensitive",
                                  "block_when_context_is_sensitive",
                                  "require_approval",
                                  "block_always"
                                ]
                              },
                              "trustedDataAction": {
                                "type": "string",
                                "enum": [
                                  "mark_as_safe",
                                  "mark_as_sensitive",
                                  "sanitize_with_dual_llm",
                                  "block_always"
                                ]
                              },
                              "reasoning": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolInvocationAction",
                              "trustedDataAction",
                              "reasoning"
                            ],
                            "additionalProperties": false
                          },
                          "error": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "toolId",
                          "success"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "success",
                    "results"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:update"
          ]
        }
      }
    },
    "/api/agents/{agentId}/tools": {
      "get": {
        "operationId": "getAgentTools",
        "tags": [
          "Agent Tools"
        ],
        "description": "Get all tools for an agent (both proxy-sniffed and MCP tools)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "agentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "catalogId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "delegateToAgentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "rawName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "parameters": {
                        "anyOf": [
                          {
                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                            "type": "object",
                            "additionalProperties": {}
                          }
                        ]
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "meta": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "clonedPendingDiscovery": {
                        "type": "boolean"
                      },
                      "policiesAutoConfiguredAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "policiesAutoConfiguringStartedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "policiesAutoConfiguredReasoning": {
                        "nullable": true,
                        "type": "string"
                      },
                      "policiesAutoConfiguredModel": {
                        "nullable": true,
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "mcpServerId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "credentialResolutionMode": {
                        "type": "string",
                        "enum": [
                          "static",
                          "dynamic",
                          "enterprise_managed"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "agentId",
                      "catalogId",
                      "delegateToAgentId",
                      "name",
                      "rawName",
                      "description",
                      "meta",
                      "clonedPendingDiscovery",
                      "policiesAutoConfiguredAt",
                      "policiesAutoConfiguringStartedAt",
                      "policiesAutoConfiguredReasoning",
                      "policiesAutoConfiguredModel",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "mcpServerId",
                      "credentialResolutionMode"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agent-tools/{id}": {
      "patch": {
        "operationId": "updateAgentTool",
        "tags": [
          "Agent Tools"
        ],
        "description": "Update an agent-tool relationship\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:update`: Modify tools, tool configuration, and security policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mcpServerId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "credentialResolutionMode": {
                    "type": "string",
                    "enum": [
                      "static",
                      "dynamic",
                      "enterprise_managed"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "toolId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "mcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "credentialResolutionMode": {
                      "type": "string",
                      "enum": [
                        "static",
                        "dynamic",
                        "enterprise_managed"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "credentialResolutionMode"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:update"
          ]
        }
      }
    },
    "/api/agents/{agentId}/delegations": {
      "get": {
        "operationId": "getAgentDelegations",
        "tags": [
          "Agent Delegations"
        ],
        "description": "Get all delegation targets for an agent. Not applicable to LLM proxies.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "systemPrompt": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "description",
                      "systemPrompt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      },
      "post": {
        "operationId": "syncAgentDelegations",
        "tags": [
          "Agent Delegations"
        ],
        "description": "Sync delegation targets for an agent. Replaces all existing delegations with the new list. Not applicable to LLM proxies.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetAgentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "targetAgentIds"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "added": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "removed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "added",
                    "removed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agents/{agentId}/delegations/{targetAgentId}": {
      "delete": {
        "operationId": "deleteAgentDelegation",
        "tags": [
          "Agent Delegations"
        ],
        "description": "Remove a specific delegation from an agent. Not applicable to LLM proxies.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "targetAgentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/agent-delegations": {
      "get": {
        "operationId": "getAllDelegationConnections",
        "tags": [
          "Agent Delegations"
        ],
        "description": "Get all agent delegation connections for canvas visualization.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "sourceAgentId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "sourceAgentName": {
                            "type": "string"
                          },
                          "targetAgentId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "targetAgentName": {
                            "type": "string"
                          },
                          "toolId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "sourceAgentId",
                          "sourceAgentName",
                          "targetAgentId",
                          "targetAgentName",
                          "toolId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "agents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "connections",
                    "agents"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/v1/anthropic/v1/messages": {
      "post": {
        "operationId": "anthropicMessagesWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Send a message to Anthropic using the default agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnthropicMessagesRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "anthropic-version",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "anthropic-beta",
            "required": false,
            "description": "Beta features to enable (comma-separated)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-api-key",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header (Bearer token for OAuth)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnthropicMessagesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/anthropic/{agentId}/v1/messages": {
      "post": {
        "operationId": "anthropicMessagesWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Send a message to Anthropic using a specific agent (n8n URL format)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnthropicMessagesRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "anthropic-version",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "anthropic-beta",
            "required": false,
            "description": "Beta features to enable (comma-separated)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-api-key",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header (Bearer token for OAuth)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnthropicMessagesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/anthropic/v1/models": {
      "get": {
        "operationId": "anthropicListModelsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List Anthropic models (default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-api-key",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "anthropic-version",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "display_name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/anthropic/{agentId}/v1/models": {
      "get": {
        "operationId": "anthropicListModelsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List Anthropic models (specific agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-api-key",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "anthropic-version",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "display_name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/api-keys": {
      "get": {
        "operationId": "getApiKeys",
        "tags": [
          "API Keys"
        ],
        "description": "List the authenticated user's Archestra API keys\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`apiKey:read`: View API keys",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "nullable": true,
                        "type": "string"
                      },
                      "start": {
                        "nullable": true,
                        "type": "string"
                      },
                      "prefix": {
                        "nullable": true,
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "enabled": {
                        "nullable": true,
                        "type": "boolean"
                      },
                      "lastRequest": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "expiresAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "metadata": {
                        "nullable": true,
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "permissions": {
                        "nullable": true,
                        "type": "object",
                        "additionalProperties": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "start",
                      "prefix",
                      "userId",
                      "enabled",
                      "lastRequest",
                      "expiresAt",
                      "createdAt",
                      "updatedAt",
                      "metadata",
                      "permissions"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "apiKey:read"
          ]
        }
      },
      "post": {
        "operationId": "createApiKey",
        "tags": [
          "API Keys"
        ],
        "description": "Create an Archestra API key for the authenticated user\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`apiKey:create`: Create API keys",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 32
                  },
                  "expiresIn": {
                    "nullable": true,
                    "type": "integer",
                    "minimum": 86400,
                    "maximum": 31536000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "start": {
                      "nullable": true,
                      "type": "string"
                    },
                    "prefix": {
                      "nullable": true,
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "enabled": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "lastRequest": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "permissions": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "key": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "start",
                    "prefix",
                    "userId",
                    "enabled",
                    "lastRequest",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "metadata",
                    "permissions",
                    "key"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "apiKey:create"
          ]
        }
      }
    },
    "/api/api-keys/{id}": {
      "get": {
        "operationId": "getApiKey",
        "tags": [
          "API Keys"
        ],
        "description": "Get one authenticated user's Archestra API key\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`apiKey:read`: View API keys",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "nullable": true,
                      "type": "string"
                    },
                    "start": {
                      "nullable": true,
                      "type": "string"
                    },
                    "prefix": {
                      "nullable": true,
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "enabled": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "lastRequest": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "permissions": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "start",
                    "prefix",
                    "userId",
                    "enabled",
                    "lastRequest",
                    "expiresAt",
                    "createdAt",
                    "updatedAt",
                    "metadata",
                    "permissions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "apiKey:read"
          ]
        }
      },
      "delete": {
        "operationId": "deleteApiKey",
        "tags": [
          "API Keys"
        ],
        "description": "Delete an Archestra API key for the authenticated user\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`apiKey:delete`: Delete API keys",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "apiKey:delete"
          ]
        }
      }
    },
    "/api/app-gallery/device/start": {
      "post": {
        "operationId": "appGalleryDeviceAuthStart",
        "tags": [
          "App Gallery"
        ],
        "description": "Start the GitHub device flow used to share a recorded app session to the public App Gallery\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deviceCode": {
                      "type": "string"
                    },
                    "userCode": {
                      "type": "string"
                    },
                    "verificationUri": {
                      "type": "string"
                    },
                    "interval": {
                      "type": "number"
                    },
                    "expiresIn": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "deviceCode",
                    "userCode",
                    "verificationUri",
                    "interval",
                    "expiresIn"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/app-gallery/device/poll": {
      "post": {
        "operationId": "appGalleryDeviceAuthPoll",
        "tags": [
          "App Gallery"
        ],
        "description": "Poll the GitHub device flow once; returns the GitHub OAuth token when the participant has authorized\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deviceCode": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "deviceCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "slow_down"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "complete"
                          ]
                        },
                        "accessToken": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "accessToken"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/app-recordings/enhance": {
      "post": {
        "operationId": "enhanceAppRecording",
        "tags": [
          "App Recordings"
        ],
        "description": "Draft the AI enhancement for a recorded app-building session: a one-sentence app description, one consolidated build prompt, one closing agent response, and a gallery category, all generated from the full chat. All are drafts the builder edits before applying; nulls mean generation was unavailable and the client falls back, with `reason` naming why the build prompt is missing so the client can say so instead of degrading silently.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "appName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "conversationId",
                  "appName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "prompt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "response": {
                      "nullable": true,
                      "type": "string"
                    },
                    "category": {
                      "nullable": true,
                      "type": "string"
                    },
                    "reason": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "empty_transcript",
                        "generation_failed"
                      ]
                    }
                  },
                  "required": [
                    "description",
                    "prompt",
                    "response",
                    "category",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/app-recordings/render": {
      "post": {
        "operationId": "renderAppRecordingVideo",
        "tags": [
          "App Recordings"
        ],
        "description": "Start rendering a recorded app session to an MP4 and return the job's id. Rendering runs in the background — poll the status endpoint and collect the file when it reports done. The recording is rendered from the bundle sent with the request; nothing is read from or written to server storage.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bundle": {},
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "bundle",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "jobId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/app-recordings/render/{jobId}": {
      "get": {
        "operationId": "getAppRecordingRenderStatus",
        "tags": [
          "App Recordings"
        ],
        "description": "How a video render is going. `done` means the file is ready to collect from the download endpoint.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "done",
                        "failed",
                        "cancelled"
                      ]
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      },
      "delete": {
        "operationId": "cancelAppRecordingRender",
        "tags": [
          "App Recordings"
        ],
        "description": "Stop a running render and discard it, freeing the browser it was driving.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cancelled": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "cancelled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/app-recordings/render/{jobId}/video": {
      "get": {
        "operationId": "downloadAppRecordingVideo",
        "tags": [
          "App Recordings"
        ],
        "description": "Collect a finished render. The job ends here — the file is handed over once and the server keeps no copy.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/app-recording/review": {
      "get": {
        "operationId": "reviewAppRecording",
        "tags": [
          "App Recordings"
        ],
        "description": "Fetch a hackathon submission's recording bundle from GitHub (raw.githubusercontent.com only), validate it against the recording contract, and return it for the on-platform, read-only review player. The fetch runs server-side so the frontend's CSP never has to reach GitHub; the bundle is public data and nothing is stored.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "src",
            "required": true,
            "description": "Absolute https://raw.githubusercontent.com/... URL of the submission's recording.json."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/apps": {
      "get": {
        "operationId": "getApps",
        "tags": [
          "Apps"
        ],
        "description": "List apps visible to the caller (paginated).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "personal",
                "team",
                "org"
              ]
            },
            "in": "query",
            "name": "scope",
            "required": false
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "authorIds",
            "required": false
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "excludeAuthorIds",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter by labels. Format: key1:val1|val2;key2:val3. AND across keys, OR within values."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionModel": {
                                "type": "string",
                                "enum": [
                                  "viewer-scoped",
                                  "server-scoped"
                                ]
                              },
                              "cspOrigin": {
                                "type": "string",
                                "enum": [
                                  "platform-pinned",
                                  "author-declared"
                                ]
                              },
                              "pinnedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time"
                              },
                              "labels": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "keyId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "valueId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "owned"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "slug": {
                                "nullable": true,
                                "type": "string"
                              },
                              "scope": {
                                "type": "string",
                                "enum": [
                                  "personal",
                                  "team",
                                  "org"
                                ]
                              },
                              "authorId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "viewerRole": {
                                "type": "string",
                                "enum": [
                                  "owner",
                                  "shared",
                                  "admin"
                                ]
                              },
                              "latestVersion": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "locked": {
                                "type": "boolean"
                              },
                              "teams": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "users": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "description",
                              "executionModel",
                              "cspOrigin",
                              "pinnedAt",
                              "labels",
                              "source",
                              "id",
                              "slug",
                              "scope",
                              "authorId",
                              "authorName",
                              "viewerRole",
                              "latestVersion",
                              "enabled",
                              "locked",
                              "teams",
                              "users"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionModel": {
                                "type": "string",
                                "enum": [
                                  "viewer-scoped",
                                  "server-scoped"
                                ]
                              },
                              "cspOrigin": {
                                "type": "string",
                                "enum": [
                                  "platform-pinned",
                                  "author-declared"
                                ]
                              },
                              "pinnedAt": {
                                "nullable": true,
                                "type": "string",
                                "format": "date-time"
                              },
                              "labels": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "keyId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "valueId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "external"
                                ]
                              },
                              "catalogId": {
                                "type": "string"
                              },
                              "mcpServerId": {
                                "type": "string"
                              },
                              "scope": {
                                "type": "string",
                                "enum": [
                                  "personal",
                                  "team",
                                  "org"
                                ]
                              },
                              "resourceUri": {
                                "type": "string"
                              },
                              "toolName": {
                                "type": "string"
                              },
                              "icon": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requiresInput": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "name",
                              "description",
                              "executionModel",
                              "cspOrigin",
                              "pinnedAt",
                              "labels",
                              "source",
                              "catalogId",
                              "mcpServerId",
                              "scope",
                              "resourceUri",
                              "toolName",
                              "icon",
                              "requiresInput"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      },
      "post": {
        "operationId": "createApp",
        "tags": [
          "Apps"
        ],
        "description": "Create a new MCP App.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:create`: Create new MCP Apps",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "html": {
                    "type": "string",
                    "minLength": 1
                  },
                  "uiPermissions": {
                    "type": "object",
                    "properties": {
                      "camera": {
                        "type": "object",
                        "properties": {}
                      },
                      "microphone": {
                        "type": "object",
                        "properties": {}
                      },
                      "geolocation": {
                        "type": "object",
                        "properties": {}
                      },
                      "clipboardWrite": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "additionalProperties": false
                  },
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "keyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "valueId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "openInChat": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templateId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "mcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "spec": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "One-line summary of what the app is for."
                        },
                        "features": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Concrete capabilities the app should provide."
                        },
                        "data": {
                          "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "ui": {
                          "description": "UI / style direction as a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Full names of the MCP tools the app calls through window.archestra."
                        }
                      },
                      "required": [
                        "summary",
                        "features",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "conversationId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "name",
                    "slug",
                    "description",
                    "templateId",
                    "mcpServerId",
                    "spec",
                    "latestVersion",
                    "enabled",
                    "locked",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "scope",
                    "environmentId",
                    "labels"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:create"
          ]
        }
      }
    },
    "/api/apps/external/{catalogId}": {
      "get": {
        "operationId": "getExternalApp",
        "tags": [
          "Apps"
        ],
        "description": "Resolve an external UI-providing app by catalog id: its UI resource and the caller's accessible installs (for the standalone run page's install selector).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "catalogId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "catalogId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "resourceUri": {
                      "type": "string"
                    },
                    "resources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "resourceUri": {
                            "type": "string"
                          },
                          "toolName": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "requiresInput": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "resourceUri",
                          "toolName",
                          "name",
                          "requiresInput"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "defaultMcpServerId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "installs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "mcpServerId": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "teamId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "localInstallationStatus": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "mcpServerId",
                          "scope",
                          "ownerId",
                          "teamId",
                          "name",
                          "localInstallationStatus"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "catalogId",
                    "name",
                    "description",
                    "resourceUri",
                    "resources",
                    "defaultMcpServerId",
                    "installs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/labels/keys": {
      "get": {
        "operationId": "getAppLabelKeys",
        "tags": [
          "Apps"
        ],
        "description": "Get all label keys used by apps\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/labels/values": {
      "get": {
        "operationId": "getAppLabelValues",
        "tags": [
          "Apps"
        ],
        "description": "Get all label values used by apps\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "key",
            "required": false,
            "description": "Filter values by label key"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/app-templates": {
      "get": {
        "operationId": "getAppTemplates",
        "tags": [
          "Apps"
        ],
        "description": "List the curated starter templates a new app can use.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "html": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "description",
                      "html"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/{appId}/open-in-chat": {
      "post": {
        "operationId": "openAppInChat",
        "tags": [
          "Apps"
        ],
        "description": "Open an existing app in chat: create a conversation with the app already rendered (no model turn) and return its id to navigate to.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)\n`chat:create`: Start new chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "required": [
                    "conversationId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read",
            "chat:create"
          ]
        }
      }
    },
    "/api/apps/external/{mcpServerId}/open-in-chat": {
      "post": {
        "operationId": "openExternalAppInChat",
        "tags": [
          "Apps"
        ],
        "description": "Open an external (MCP-server) UI app in chat: create a conversation and return its id to navigate to. When the tool needs no inputs the app is seeded already rendered (no model turn); when it has required inputs the conversation is created empty and the response carries an opening prompt for the client to send.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)\n`chat:create`: Start new chat conversations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resourceUri": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "resourceUri"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "mcpServerId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "render",
                        "prompt"
                      ]
                    },
                    "prompt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "conversationId",
                    "mode"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read",
            "chat:create"
          ]
        }
      }
    },
    "/api/apps/{appId}/pin": {
      "put": {
        "operationId": "pinApp",
        "tags": [
          "Apps"
        ],
        "description": "Pin an app for the current user (mirrors project pins). Personal — does not affect other members. Any user who can view the app may pin it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      },
      "delete": {
        "operationId": "unpinApp",
        "tags": [
          "Apps"
        ],
        "description": "Remove the current user's pin on an app. Idempotent; intentionally no visibility check, so a stale pin on an app that was since re-scoped away (or deleted) can still be cleared.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/external/{mcpServerId}/pin": {
      "put": {
        "operationId": "pinExternalApp",
        "tags": [
          "Apps"
        ],
        "description": "Pin an external (MCP-server) UI app for the current user, identified by install + resource + tool (several tools of one server can share a UI resource, so the tool name pins one tile, not the group). Personal — does not affect other members.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resourceUri": {
                    "type": "string",
                    "minLength": 1
                  },
                  "toolName": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "resourceUri",
                  "toolName"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "mcpServerId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      },
      "delete": {
        "operationId": "unpinExternalApp",
        "tags": [
          "Apps"
        ],
        "description": "Remove the current user's pin on an external app. Idempotent; intentionally no access check, so a stale pin on an install the user lost access to can still be cleared. `resourceUri` and `toolName` ride the query string (DELETE carries no body).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "resourceUri",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "toolName",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "mcpServerId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/{appId}": {
      "get": {
        "operationId": "getApp",
        "tags": [
          "Apps"
        ],
        "description": "Get a single app by id or slug, if the caller may view it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templateId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "mcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "spec": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "One-line summary of what the app is for."
                        },
                        "features": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Concrete capabilities the app should provide."
                        },
                        "data": {
                          "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "ui": {
                          "description": "UI / style direction as a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Full names of the MCP tools the app calls through window.archestra."
                        }
                      },
                      "required": [
                        "summary",
                        "features",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "name",
                    "slug",
                    "description",
                    "templateId",
                    "mcpServerId",
                    "spec",
                    "latestVersion",
                    "enabled",
                    "locked",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "scope",
                    "environmentId",
                    "labels",
                    "teams",
                    "users",
                    "viewerRole",
                    "authorName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      },
      "patch": {
        "operationId": "updateApp",
        "tags": [
          "Apps"
        ],
        "description": "Update an app's metadata and/or html (forks a new version).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:update`: Modify MCP Apps, their tools, and their team assignments",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "description": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 500
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "html": {
                    "type": "string",
                    "minLength": 1
                  },
                  "uiPermissions": {
                    "type": "object",
                    "properties": {
                      "camera": {
                        "type": "object",
                        "properties": {}
                      },
                      "microphone": {
                        "type": "object",
                        "properties": {}
                      },
                      "geolocation": {
                        "type": "object",
                        "properties": {}
                      },
                      "clipboardWrite": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "additionalProperties": false
                  },
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "keyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "valueId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "userIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templateId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "mcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "spec": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "One-line summary of what the app is for."
                        },
                        "features": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Concrete capabilities the app should provide."
                        },
                        "data": {
                          "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "ui": {
                          "description": "UI / style direction as a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Full names of the MCP tools the app calls through window.archestra."
                        }
                      },
                      "required": [
                        "summary",
                        "features",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "name",
                    "slug",
                    "description",
                    "templateId",
                    "mcpServerId",
                    "spec",
                    "latestVersion",
                    "enabled",
                    "locked",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "scope",
                    "environmentId",
                    "labels"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteApp",
        "tags": [
          "Apps"
        ],
        "description": "Soft-delete an app the caller owns or administers.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:delete`: Delete MCP Apps",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:delete"
          ]
        }
      }
    },
    "/api/apps/{appId}/enable": {
      "post": {
        "operationId": "enableApp",
        "tags": [
          "Apps"
        ],
        "description": "Enable a disabled app, making it live at its scope.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:update`: Modify MCP Apps, their tools, and their team assignments",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templateId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "mcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "spec": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "One-line summary of what the app is for."
                        },
                        "features": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Concrete capabilities the app should provide."
                        },
                        "data": {
                          "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "ui": {
                          "description": "UI / style direction as a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Full names of the MCP tools the app calls through window.archestra."
                        }
                      },
                      "required": [
                        "summary",
                        "features",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "name",
                    "slug",
                    "description",
                    "templateId",
                    "mcpServerId",
                    "spec",
                    "latestVersion",
                    "enabled",
                    "locked",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "scope",
                    "environmentId",
                    "labels",
                    "teams",
                    "users",
                    "viewerRole",
                    "authorName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:update"
          ]
        }
      }
    },
    "/api/apps/{appId}/disable": {
      "post": {
        "operationId": "disableApp",
        "tags": [
          "Apps"
        ],
        "description": "Disable an app, pulling it back to an author-only state.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:update`: Modify MCP Apps, their tools, and their team assignments",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templateId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "mcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "spec": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "One-line summary of what the app is for."
                        },
                        "features": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Concrete capabilities the app should provide."
                        },
                        "data": {
                          "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "ui": {
                          "description": "UI / style direction as a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Full names of the MCP tools the app calls through window.archestra."
                        }
                      },
                      "required": [
                        "summary",
                        "features",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "name",
                    "slug",
                    "description",
                    "templateId",
                    "mcpServerId",
                    "spec",
                    "latestVersion",
                    "enabled",
                    "locked",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "scope",
                    "environmentId",
                    "labels",
                    "teams",
                    "users",
                    "viewerRole",
                    "authorName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:update"
          ]
        }
      }
    },
    "/api/apps/{appId}/lock": {
      "post": {
        "operationId": "lockApp",
        "tags": [
          "Apps"
        ],
        "description": "Lock an app, refusing all chat-driven modification (and REST html replacement/deletion) until unlocked.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:update`: Modify MCP Apps, their tools, and their team assignments",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templateId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "mcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "spec": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "One-line summary of what the app is for."
                        },
                        "features": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Concrete capabilities the app should provide."
                        },
                        "data": {
                          "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "ui": {
                          "description": "UI / style direction as a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Full names of the MCP tools the app calls through window.archestra."
                        }
                      },
                      "required": [
                        "summary",
                        "features",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "name",
                    "slug",
                    "description",
                    "templateId",
                    "mcpServerId",
                    "spec",
                    "latestVersion",
                    "enabled",
                    "locked",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "scope",
                    "environmentId",
                    "labels",
                    "teams",
                    "users",
                    "viewerRole",
                    "authorName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:update"
          ]
        }
      }
    },
    "/api/apps/{appId}/unlock": {
      "post": {
        "operationId": "unlockApp",
        "tags": [
          "Apps"
        ],
        "description": "Unlock a locked app, making it editable again.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:update`: Modify MCP Apps, their tools, and their team assignments",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templateId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "mcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "spec": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "One-line summary of what the app is for."
                        },
                        "features": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Concrete capabilities the app should provide."
                        },
                        "data": {
                          "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "ui": {
                          "description": "UI / style direction as a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Full names of the MCP tools the app calls through window.archestra."
                        }
                      },
                      "required": [
                        "summary",
                        "features",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "name",
                    "slug",
                    "description",
                    "templateId",
                    "mcpServerId",
                    "spec",
                    "latestVersion",
                    "enabled",
                    "locked",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "scope",
                    "environmentId",
                    "labels",
                    "teams",
                    "users",
                    "viewerRole",
                    "authorName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:update"
          ]
        }
      }
    },
    "/api/apps/{appId}/versions": {
      "get": {
        "operationId": "getAppVersions",
        "tags": [
          "Apps"
        ],
        "description": "List an app's versions, newest first.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "appId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "version": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "html": {
                        "type": "string"
                      },
                      "uiPermissions": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "camera": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": false
                          },
                          "microphone": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": false
                          },
                          "geolocation": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": false
                          },
                          "clipboardWrite": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      },
                      "contentHash": {
                        "type": "string"
                      },
                      "spec": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "summary": {
                            "type": "string",
                            "description": "One-line summary of what the app is for."
                          },
                          "features": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Concrete capabilities the app should provide."
                          },
                          "data": {
                            "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                            "nullable": true,
                            "type": "string"
                          },
                          "ui": {
                            "description": "UI / style direction as a free-form prose string, not a structured object.",
                            "nullable": true,
                            "type": "string"
                          },
                          "tools": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Full names of the MCP tools the app calls through window.archestra."
                          }
                        },
                        "required": [
                          "summary",
                          "features",
                          "tools"
                        ],
                        "additionalProperties": false
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "appId",
                      "version",
                      "html",
                      "uiPermissions",
                      "contentHash",
                      "spec",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/{appId}/versions/{version}": {
      "get": {
        "operationId": "getAppVersion",
        "tags": [
          "Apps"
        ],
        "description": "Get a specific app version.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          },
          {
            "schema": {
              "type": "integer",
              "exclusiveMinimum": true,
              "maximum": 9007199254740991
            },
            "in": "path",
            "name": "version",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "appId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "html": {
                      "type": "string"
                    },
                    "uiPermissions": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "camera": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": false
                        },
                        "microphone": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": false
                        },
                        "geolocation": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": false
                        },
                        "clipboardWrite": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    "contentHash": {
                      "type": "string"
                    },
                    "spec": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "One-line summary of what the app is for."
                        },
                        "features": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Concrete capabilities the app should provide."
                        },
                        "data": {
                          "description": "What the app reads/persists via the App Data Store — a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "ui": {
                          "description": "UI / style direction as a free-form prose string, not a structured object.",
                          "nullable": true,
                          "type": "string"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Full names of the MCP tools the app calls through window.archestra."
                        }
                      },
                      "required": [
                        "summary",
                        "features",
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "appId",
                    "version",
                    "html",
                    "uiPermissions",
                    "contentHash",
                    "spec",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/{appId}/tools": {
      "get": {
        "operationId": "getAppTools",
        "tags": [
          "Apps"
        ],
        "description": "List the tools assigned to an app.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "agentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "catalogId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "delegateToAgentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "rawName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "parameters": {
                        "anyOf": [
                          {
                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                            "type": "object",
                            "additionalProperties": {}
                          }
                        ]
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "meta": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "clonedPendingDiscovery": {
                        "type": "boolean"
                      },
                      "policiesAutoConfiguredAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "policiesAutoConfiguringStartedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "policiesAutoConfiguredReasoning": {
                        "nullable": true,
                        "type": "string"
                      },
                      "policiesAutoConfiguredModel": {
                        "nullable": true,
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "agentId",
                      "catalogId",
                      "delegateToAgentId",
                      "name",
                      "rawName",
                      "description",
                      "meta",
                      "clonedPendingDiscovery",
                      "policiesAutoConfiguredAt",
                      "policiesAutoConfiguringStartedAt",
                      "policiesAutoConfiguredReasoning",
                      "policiesAutoConfiguredModel",
                      "createdAt",
                      "updatedAt",
                      "deletedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/{appId}/diagnostics": {
      "post": {
        "operationId": "postAppRenderDiagnostics",
        "tags": [
          "Apps"
        ],
        "description": "Record the calling user's latest render diagnostics for an app. An empty entries array means the render was clean.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "entries": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "maxLength": 32
                        },
                        "message": {
                          "type": "string",
                          "maxLength": 1000
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ]
                    }
                  }
                },
                "required": [
                  "version",
                  "entries"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/{appId}/screenshot": {
      "post": {
        "operationId": "postAppRenderScreenshot",
        "tags": [
          "Apps"
        ],
        "description": "Record the calling user's latest render screenshot for an app (a base64 image data URL the app self-captured).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:read`: View and run MCP Apps within your scope (org, your teams, your own)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "dataUrl": {
                    "type": "string",
                    "maxLength": 2000000,
                    "pattern": "^data:image\\/(png|jpeg|webp);base64,"
                  }
                },
                "required": [
                  "version",
                  "dataUrl"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:read"
          ]
        }
      }
    },
    "/api/apps/{appId}/tools/{toolId}": {
      "post": {
        "operationId": "assignToolToApp",
        "tags": [
          "Apps"
        ],
        "description": "Assign an upstream tool to an app.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:update`: Modify MCP Apps, their tools, and their team assignments",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mcpServerId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "credentialResolutionMode": {
                    "type": "string",
                    "enum": [
                      "static",
                      "dynamic",
                      "enterprise_managed"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "toolId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:update"
          ]
        }
      },
      "delete": {
        "operationId": "unassignToolFromApp",
        "tags": [
          "Apps"
        ],
        "description": "Unassign a tool from an app.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`app:update`: Modify MCP Apps, their tools, and their team assignments",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "toolId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "app:update"
          ]
        }
      }
    },
    "/v1/archestra/chat/completions": {
      "post": {
        "operationId": "archestraChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Archestra (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchestraChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArchestraChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/archestra/{agentId}/chat/completions": {
      "post": {
        "operationId": "archestraChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Archestra for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchestraChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArchestraChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/audit-logs": {
      "get": {
        "operationId": "getAuditLogs",
        "tags": [
          "Audit Log"
        ],
        "description": "Get paginated audit log events for the organization. Requires auditLog:read permission (Admin only by default).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`auditLog:read`: View audit log records of your own administrative actions",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "in": "query",
            "name": "startDate",
            "required": false,
            "description": "Filter events on or after this date (ISO 8601)"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "in": "query",
            "name": "endDate",
            "required": false,
            "description": "Filter events on or before this date (ISO 8601)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "actorId",
            "required": false,
            "description": "Filter by actor ID"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "agent.created",
                "agent.updated",
                "agent.deleted",
                "agent.restored",
                "agent.imported",
                "agent.purged",
                "agentTool.created",
                "agentTool.updated",
                "agentTool.deleted",
                "agentTool.bulk_assigned",
                "agentTool.bulk_removed",
                "agentTool.bulk_updated",
                "apiKey.created",
                "apiKey.deleted",
                "app.created",
                "app.updated",
                "app.deleted",
                "chatOpsBinding.created",
                "chatOpsBinding.updated",
                "chatOpsBinding.deleted",
                "chatOpsBinding.refreshed",
                "chatOpsConfig.updated",
                "connector.created",
                "connector.updated",
                "connector.deleted",
                "connector.restored",
                "connector.purged",
                "connector.permission_sync_triggered",
                "connector.synced",
                "defaultUserLimit.created",
                "defaultUserLimit.updated",
                "defaultUserLimit.deleted",
                "environment.created",
                "environment.updated",
                "environment.deleted",
                "githubAppConfig.created",
                "githubAppConfig.updated",
                "githubAppConfig.deleted",
                "githubPat.created",
                "githubPat.updated",
                "githubPat.deleted",
                "identityProvider.created",
                "identityProvider.updated",
                "identityProvider.deleted",
                "internalMcpCatalog.created",
                "internalMcpCatalog.updated",
                "internalMcpCatalog.deleted",
                "internalMcpCatalog.restored",
                "internalMcpCatalog.reinstalled",
                "invitation.created",
                "invitation.deleted",
                "knowledgeBase.created",
                "knowledgeBase.updated",
                "knowledgeBase.deleted",
                "knowledgeBase.restored",
                "knowledgeBase.purged",
                "limit.created",
                "limit.updated",
                "limit.deleted",
                "llmModel.updated",
                "llmModel.synced",
                "llmOauthClient.created",
                "llmOauthClient.updated",
                "llmOauthClient.deleted",
                "llmOauthClient.rotated",
                "llmProviderApiKey.created",
                "llmProviderApiKey.deleted",
                "mcpOauthClient.created",
                "mcpOauthClient.updated",
                "mcpOauthClient.deleted",
                "mcpOauthClient.rotated",
                "mcpServer.created",
                "mcpServer.updated",
                "mcpServer.deleted",
                "mcpServer.restored",
                "mcpServer.reinstalled",
                "mcpServerInstallationRequest.created",
                "mcpServerInstallationRequest.updated",
                "member.created",
                "member.role_updated",
                "member.deleted",
                "optimizationRule.created",
                "optimizationRule.updated",
                "optimizationRule.deleted",
                "organization.updated",
                "project.created",
                "project.updated",
                "project.deleted",
                "project.restored",
                "project.purged",
                "role.created",
                "role.updated",
                "role.deleted",
                "scheduleTrigger.created",
                "scheduleTrigger.updated",
                "scheduleTrigger.deleted",
                "scheduleTrigger.triggered",
                "serviceAccount.created",
                "serviceAccount.updated",
                "serviceAccount.deleted",
                "skill.created",
                "skill.updated",
                "skill.deleted",
                "skill.restored",
                "skill.purged",
                "skill.imported",
                "team.created",
                "team.updated",
                "team.deleted",
                "teamToken.rotated",
                "tool.deleted",
                "toolInvocationPolicy.created",
                "toolInvocationPolicy.updated",
                "toolInvocationPolicy.deleted",
                "toolInvocationPolicy.bulk_defaulted",
                "toolInvocationPolicy.auto_configured",
                "trustedDataPolicy.created",
                "trustedDataPolicy.updated",
                "trustedDataPolicy.deleted",
                "trustedDataPolicy.bulk_defaulted",
                "user.password_reset",
                "userToken.rotated",
                "virtualApiKey.created",
                "virtualApiKey.deleted",
                "auth.impersonation_started",
                "auth.impersonation_stopped",
                "auth.signed_in",
                "auth.signed_out",
                "auth.signed_up",
                "auth.sso_callback",
                "unknown.created",
                "unknown.updated",
                "unknown.deleted"
              ]
            },
            "in": "query",
            "name": "action",
            "required": false,
            "description": "Filter by action type (dotted name, e.g. agent.created)"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "success",
                "failure",
                "denied"
              ]
            },
            "in": "query",
            "name": "outcome",
            "required": false,
            "description": "Filter by outcome (success, failure, or denied)"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "api_key",
                "service_account",
                "system",
                "sso"
              ]
            },
            "in": "query",
            "name": "actorType",
            "required": false,
            "description": "Filter by actor type (user, api_key, sso, or system)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "resourceType",
            "required": false,
            "description": "Filter by resource type (e.g. agent, role)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "resourceId",
            "required": false,
            "description": "Filter by resource ID (e.g. a specific agent's ID)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Case-insensitive search across actor email, actor name, HTTP path, resource ID, and resource name"
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "eventSequence": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "occurredAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "actorId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "actorType": {
                            "type": "string",
                            "enum": [
                              "user",
                              "api_key",
                              "service_account",
                              "system",
                              "sso"
                            ]
                          },
                          "actorName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "actorEmail": {
                            "nullable": true,
                            "type": "string"
                          },
                          "impersonatedBy": {
                            "nullable": true,
                            "type": "string"
                          },
                          "action": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "agent.created",
                                  "agent.updated",
                                  "agent.deleted",
                                  "agent.restored",
                                  "agent.imported",
                                  "agent.purged",
                                  "agentTool.created",
                                  "agentTool.updated",
                                  "agentTool.deleted",
                                  "agentTool.bulk_assigned",
                                  "agentTool.bulk_removed",
                                  "agentTool.bulk_updated",
                                  "apiKey.created",
                                  "apiKey.deleted",
                                  "app.created",
                                  "app.updated",
                                  "app.deleted",
                                  "chatOpsBinding.created",
                                  "chatOpsBinding.updated",
                                  "chatOpsBinding.deleted",
                                  "chatOpsBinding.refreshed",
                                  "chatOpsConfig.updated",
                                  "connector.created",
                                  "connector.updated",
                                  "connector.deleted",
                                  "connector.restored",
                                  "connector.purged",
                                  "connector.permission_sync_triggered",
                                  "connector.synced",
                                  "defaultUserLimit.created",
                                  "defaultUserLimit.updated",
                                  "defaultUserLimit.deleted",
                                  "environment.created",
                                  "environment.updated",
                                  "environment.deleted",
                                  "githubAppConfig.created",
                                  "githubAppConfig.updated",
                                  "githubAppConfig.deleted",
                                  "githubPat.created",
                                  "githubPat.updated",
                                  "githubPat.deleted",
                                  "identityProvider.created",
                                  "identityProvider.updated",
                                  "identityProvider.deleted",
                                  "internalMcpCatalog.created",
                                  "internalMcpCatalog.updated",
                                  "internalMcpCatalog.deleted",
                                  "internalMcpCatalog.restored",
                                  "internalMcpCatalog.reinstalled",
                                  "invitation.created",
                                  "invitation.deleted",
                                  "knowledgeBase.created",
                                  "knowledgeBase.updated",
                                  "knowledgeBase.deleted",
                                  "knowledgeBase.restored",
                                  "knowledgeBase.purged",
                                  "limit.created",
                                  "limit.updated",
                                  "limit.deleted",
                                  "llmModel.updated",
                                  "llmModel.synced",
                                  "llmOauthClient.created",
                                  "llmOauthClient.updated",
                                  "llmOauthClient.deleted",
                                  "llmOauthClient.rotated",
                                  "llmProviderApiKey.created",
                                  "llmProviderApiKey.deleted",
                                  "mcpOauthClient.created",
                                  "mcpOauthClient.updated",
                                  "mcpOauthClient.deleted",
                                  "mcpOauthClient.rotated",
                                  "mcpServer.created",
                                  "mcpServer.updated",
                                  "mcpServer.deleted",
                                  "mcpServer.restored",
                                  "mcpServer.reinstalled",
                                  "mcpServerInstallationRequest.created",
                                  "mcpServerInstallationRequest.updated",
                                  "member.created",
                                  "member.role_updated",
                                  "member.deleted",
                                  "optimizationRule.created",
                                  "optimizationRule.updated",
                                  "optimizationRule.deleted",
                                  "organization.updated",
                                  "project.created",
                                  "project.updated",
                                  "project.deleted",
                                  "project.restored",
                                  "project.purged",
                                  "role.created",
                                  "role.updated",
                                  "role.deleted",
                                  "scheduleTrigger.created",
                                  "scheduleTrigger.updated",
                                  "scheduleTrigger.deleted",
                                  "scheduleTrigger.triggered",
                                  "serviceAccount.created",
                                  "serviceAccount.updated",
                                  "serviceAccount.deleted",
                                  "skill.created",
                                  "skill.updated",
                                  "skill.deleted",
                                  "skill.restored",
                                  "skill.purged",
                                  "skill.imported",
                                  "team.created",
                                  "team.updated",
                                  "team.deleted",
                                  "teamToken.rotated",
                                  "tool.deleted",
                                  "toolInvocationPolicy.created",
                                  "toolInvocationPolicy.updated",
                                  "toolInvocationPolicy.deleted",
                                  "toolInvocationPolicy.bulk_defaulted",
                                  "toolInvocationPolicy.auto_configured",
                                  "trustedDataPolicy.created",
                                  "trustedDataPolicy.updated",
                                  "trustedDataPolicy.deleted",
                                  "trustedDataPolicy.bulk_defaulted",
                                  "user.password_reset",
                                  "userToken.rotated",
                                  "virtualApiKey.created",
                                  "virtualApiKey.deleted",
                                  "auth.impersonation_started",
                                  "auth.impersonation_stopped",
                                  "auth.signed_in",
                                  "auth.signed_out",
                                  "auth.signed_up",
                                  "auth.sso_callback",
                                  "unknown.created",
                                  "unknown.updated",
                                  "unknown.deleted"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "outcome": {
                            "type": "string",
                            "enum": [
                              "success",
                              "failure",
                              "denied"
                            ]
                          },
                          "resourceType": {
                            "nullable": true,
                            "type": "string"
                          },
                          "resourceId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "resourceName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "before": {
                            "nullable": true,
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "after": {
                            "nullable": true,
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "httpMethod": {
                            "nullable": true,
                            "type": "string"
                          },
                          "httpPath": {
                            "nullable": true,
                            "type": "string"
                          },
                          "httpRoute": {
                            "nullable": true,
                            "type": "string"
                          },
                          "httpStatus": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "requestId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "sourceIp": {
                            "nullable": true,
                            "type": "string"
                          },
                          "userAgent": {
                            "nullable": true,
                            "type": "string"
                          },
                          "impersonatedByEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "eventSequence",
                          "organizationId",
                          "occurredAt",
                          "createdAt",
                          "actorId",
                          "actorType",
                          "actorName",
                          "actorEmail",
                          "impersonatedBy",
                          "action",
                          "outcome",
                          "resourceType",
                          "resourceId",
                          "resourceName",
                          "before",
                          "after",
                          "httpMethod",
                          "httpPath",
                          "httpRoute",
                          "httpStatus",
                          "requestId",
                          "sourceIp",
                          "userAgent",
                          "impersonatedByEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "auditLog:read"
          ]
        }
      }
    },
    "/api/audit-logs/{id}": {
      "get": {
        "operationId": "getAuditLog",
        "tags": [
          "Audit Log"
        ],
        "description": "Get a single audit log event by ID. Requires auditLog:read permission (Admin only by default).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`auditLog:read`: View audit log records of your own administrative actions",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "eventSequence": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "occurredAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "actorType": {
                      "type": "string",
                      "enum": [
                        "user",
                        "api_key",
                        "service_account",
                        "system",
                        "sso"
                      ]
                    },
                    "actorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "actorEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "impersonatedBy": {
                      "nullable": true,
                      "type": "string"
                    },
                    "action": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "agent.created",
                            "agent.updated",
                            "agent.deleted",
                            "agent.restored",
                            "agent.imported",
                            "agent.purged",
                            "agentTool.created",
                            "agentTool.updated",
                            "agentTool.deleted",
                            "agentTool.bulk_assigned",
                            "agentTool.bulk_removed",
                            "agentTool.bulk_updated",
                            "apiKey.created",
                            "apiKey.deleted",
                            "app.created",
                            "app.updated",
                            "app.deleted",
                            "chatOpsBinding.created",
                            "chatOpsBinding.updated",
                            "chatOpsBinding.deleted",
                            "chatOpsBinding.refreshed",
                            "chatOpsConfig.updated",
                            "connector.created",
                            "connector.updated",
                            "connector.deleted",
                            "connector.restored",
                            "connector.purged",
                            "connector.permission_sync_triggered",
                            "connector.synced",
                            "defaultUserLimit.created",
                            "defaultUserLimit.updated",
                            "defaultUserLimit.deleted",
                            "environment.created",
                            "environment.updated",
                            "environment.deleted",
                            "githubAppConfig.created",
                            "githubAppConfig.updated",
                            "githubAppConfig.deleted",
                            "githubPat.created",
                            "githubPat.updated",
                            "githubPat.deleted",
                            "identityProvider.created",
                            "identityProvider.updated",
                            "identityProvider.deleted",
                            "internalMcpCatalog.created",
                            "internalMcpCatalog.updated",
                            "internalMcpCatalog.deleted",
                            "internalMcpCatalog.restored",
                            "internalMcpCatalog.reinstalled",
                            "invitation.created",
                            "invitation.deleted",
                            "knowledgeBase.created",
                            "knowledgeBase.updated",
                            "knowledgeBase.deleted",
                            "knowledgeBase.restored",
                            "knowledgeBase.purged",
                            "limit.created",
                            "limit.updated",
                            "limit.deleted",
                            "llmModel.updated",
                            "llmModel.synced",
                            "llmOauthClient.created",
                            "llmOauthClient.updated",
                            "llmOauthClient.deleted",
                            "llmOauthClient.rotated",
                            "llmProviderApiKey.created",
                            "llmProviderApiKey.deleted",
                            "mcpOauthClient.created",
                            "mcpOauthClient.updated",
                            "mcpOauthClient.deleted",
                            "mcpOauthClient.rotated",
                            "mcpServer.created",
                            "mcpServer.updated",
                            "mcpServer.deleted",
                            "mcpServer.restored",
                            "mcpServer.reinstalled",
                            "mcpServerInstallationRequest.created",
                            "mcpServerInstallationRequest.updated",
                            "member.created",
                            "member.role_updated",
                            "member.deleted",
                            "optimizationRule.created",
                            "optimizationRule.updated",
                            "optimizationRule.deleted",
                            "organization.updated",
                            "project.created",
                            "project.updated",
                            "project.deleted",
                            "project.restored",
                            "project.purged",
                            "role.created",
                            "role.updated",
                            "role.deleted",
                            "scheduleTrigger.created",
                            "scheduleTrigger.updated",
                            "scheduleTrigger.deleted",
                            "scheduleTrigger.triggered",
                            "serviceAccount.created",
                            "serviceAccount.updated",
                            "serviceAccount.deleted",
                            "skill.created",
                            "skill.updated",
                            "skill.deleted",
                            "skill.restored",
                            "skill.purged",
                            "skill.imported",
                            "team.created",
                            "team.updated",
                            "team.deleted",
                            "teamToken.rotated",
                            "tool.deleted",
                            "toolInvocationPolicy.created",
                            "toolInvocationPolicy.updated",
                            "toolInvocationPolicy.deleted",
                            "toolInvocationPolicy.bulk_defaulted",
                            "toolInvocationPolicy.auto_configured",
                            "trustedDataPolicy.created",
                            "trustedDataPolicy.updated",
                            "trustedDataPolicy.deleted",
                            "trustedDataPolicy.bulk_defaulted",
                            "user.password_reset",
                            "userToken.rotated",
                            "virtualApiKey.created",
                            "virtualApiKey.deleted",
                            "auth.impersonation_started",
                            "auth.impersonation_stopped",
                            "auth.signed_in",
                            "auth.signed_out",
                            "auth.signed_up",
                            "auth.sso_callback",
                            "unknown.created",
                            "unknown.updated",
                            "unknown.deleted"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "denied"
                      ]
                    },
                    "resourceType": {
                      "nullable": true,
                      "type": "string"
                    },
                    "resourceId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "resourceName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "before": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "after": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "httpMethod": {
                      "nullable": true,
                      "type": "string"
                    },
                    "httpPath": {
                      "nullable": true,
                      "type": "string"
                    },
                    "httpRoute": {
                      "nullable": true,
                      "type": "string"
                    },
                    "httpStatus": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "requestId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "sourceIp": {
                      "nullable": true,
                      "type": "string"
                    },
                    "userAgent": {
                      "nullable": true,
                      "type": "string"
                    },
                    "impersonatedByEmail": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "eventSequence",
                    "organizationId",
                    "occurredAt",
                    "createdAt",
                    "actorId",
                    "actorType",
                    "actorName",
                    "actorEmail",
                    "impersonatedBy",
                    "action",
                    "outcome",
                    "resourceType",
                    "resourceId",
                    "resourceName",
                    "before",
                    "after",
                    "httpMethod",
                    "httpPath",
                    "httpRoute",
                    "httpStatus",
                    "requestId",
                    "sourceIp",
                    "userAgent",
                    "impersonatedByEmail"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "auditLog:read"
          ]
        }
      }
    },
    "/api/auth-state": {
      "get": {
        "operationId": "getAuthState",
        "tags": [
          "Auth"
        ],
        "description": "Report whether a two-factor sign-in challenge is currently pending\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "twoFactorPending": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "twoFactorPending"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/auth/default-credentials-status": {
      "get": {
        "operationId": "getDefaultCredentialsStatus",
        "tags": [
          "Auth"
        ],
        "description": "Get default credentials status\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "enabled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "enabled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/auth/organization/remove-member": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/auth/oauth2/client-info": {
      "get": {
        "operationId": "getOAuthClientInfo",
        "tags": [
          "Auth"
        ],
        "description": "Get OAuth client name by client_id\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "client_id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "client_name": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "client_name"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/auth/oauth2/authorize": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/auth/oauth2/token": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/auth/oauth2/revoke": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/auth/oauth2/consent": {
      "post": {
        "operationId": "submitOAuthConsent",
        "tags": [
          "Auth"
        ],
        "description": "Submit OAuth consent decision (accept or deny)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accept": {
                    "type": "boolean"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "oauth_query": {
                    "type": "string"
                  }
                },
                "required": [
                  "accept",
                  "scope",
                  "oauth_query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "redirectTo": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "redirectTo"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/auth/oauth2/register": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/auth/sign-in/sso": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/auth/{*}": {
      "get": {
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "*",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      },
      "post": {
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "*",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/autonomy-policies/operators": {
      "get": {
        "operationId": "getOperators",
        "tags": [
          "Autonomy Policies"
        ],
        "description": "Get all supported policy operators\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string",
                        "enum": [
                          "equal",
                          "notEqual",
                          "contains",
                          "notContains",
                          "startsWith",
                          "endsWith",
                          "regex"
                        ]
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "value",
                      "label"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      }
    },
    "/api/autonomy-policies/tool-invocation": {
      "get": {
        "operationId": "getToolInvocationPolicies",
        "tags": [
          "Tool Invocation Policies"
        ],
        "description": "Get all tool invocation policies\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "toolId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "conditions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string"
                            },
                            "operator": {
                              "type": "string",
                              "enum": [
                                "equal",
                                "notEqual",
                                "contains",
                                "notContains",
                                "startsWith",
                                "endsWith",
                                "regex"
                              ]
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "key",
                            "operator",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "allow_when_context_is_untrusted",
                          "block_when_context_is_untrusted",
                          "block_always",
                          "require_approval"
                        ]
                      },
                      "reason": {
                        "nullable": true,
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "toolId",
                      "conditions",
                      "action",
                      "reason",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      },
      "post": {
        "operationId": "createToolInvocationPolicy",
        "tags": [
          "Tool Invocation Policies"
        ],
        "description": "Create a new tool invocation policy\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:create`: Register tools and create security policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toolId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "equal",
                            "notEqual",
                            "contains",
                            "notContains",
                            "startsWith",
                            "endsWith",
                            "regex"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "key",
                        "operator",
                        "value"
                      ]
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "allow_when_context_is_untrusted",
                      "block_when_context_is_untrusted",
                      "block_always",
                      "require_approval"
                    ]
                  },
                  "reason": {
                    "nullable": true,
                    "type": "string"
                  }
                },
                "required": [
                  "toolId",
                  "conditions",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "toolId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "equal",
                              "notEqual",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "regex"
                            ]
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "operator",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "reason": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "toolId",
                    "conditions",
                    "action",
                    "reason",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:create"
          ]
        }
      }
    },
    "/api/autonomy-policies/tool-invocation/{id}": {
      "get": {
        "operationId": "getToolInvocationPolicy",
        "tags": [
          "Tool Invocation Policies"
        ],
        "description": "Get tool invocation policy by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "toolId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "equal",
                              "notEqual",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "regex"
                            ]
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "operator",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "reason": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "toolId",
                    "conditions",
                    "action",
                    "reason",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      },
      "put": {
        "operationId": "updateToolInvocationPolicy",
        "tags": [
          "Tool Invocation Policies"
        ],
        "description": "Update a tool invocation policy\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:update`: Modify tools, tool configuration, and security policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toolId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "equal",
                            "notEqual",
                            "contains",
                            "notContains",
                            "startsWith",
                            "endsWith",
                            "regex"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "key",
                        "operator",
                        "value"
                      ]
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "allow_when_context_is_untrusted",
                      "block_when_context_is_untrusted",
                      "block_always",
                      "require_approval"
                    ]
                  },
                  "reason": {
                    "nullable": true,
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "toolId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "equal",
                              "notEqual",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "regex"
                            ]
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "operator",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "reason": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "toolId",
                    "conditions",
                    "action",
                    "reason",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteToolInvocationPolicy",
        "tags": [
          "Tool Invocation Policies"
        ],
        "description": "Delete a tool invocation policy\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:delete`: Remove tools and security policies",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:delete"
          ]
        }
      }
    },
    "/api/trusted-data-policies": {
      "get": {
        "operationId": "getTrustedDataPolicies",
        "tags": [
          "Trusted Data Policies"
        ],
        "description": "Get all trusted data policies\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "toolId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "conditions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string"
                            },
                            "operator": {
                              "type": "string",
                              "enum": [
                                "equal",
                                "notEqual",
                                "contains",
                                "notContains",
                                "startsWith",
                                "endsWith",
                                "regex"
                              ]
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "key",
                            "operator",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "block_always",
                          "mark_as_trusted",
                          "mark_as_untrusted",
                          "sanitize_with_dual_llm"
                        ]
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "toolId",
                      "description",
                      "conditions",
                      "action",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      },
      "post": {
        "operationId": "createTrustedDataPolicy",
        "tags": [
          "Trusted Data Policies"
        ],
        "description": "Create a new trusted data policy\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:create`: Register tools and create security policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toolId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "equal",
                            "notEqual",
                            "contains",
                            "notContains",
                            "startsWith",
                            "endsWith",
                            "regex"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "key",
                        "operator",
                        "value"
                      ]
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "block_always",
                      "mark_as_trusted",
                      "mark_as_untrusted",
                      "sanitize_with_dual_llm"
                    ]
                  }
                },
                "required": [
                  "toolId",
                  "conditions",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "toolId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "equal",
                              "notEqual",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "regex"
                            ]
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "operator",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "toolId",
                    "description",
                    "conditions",
                    "action",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:create"
          ]
        }
      }
    },
    "/api/trusted-data-policies/{id}": {
      "get": {
        "operationId": "getTrustedDataPolicy",
        "tags": [
          "Trusted Data Policies"
        ],
        "description": "Get trusted data policy by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "toolId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "equal",
                              "notEqual",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "regex"
                            ]
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "operator",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "toolId",
                    "description",
                    "conditions",
                    "action",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      },
      "put": {
        "operationId": "updateTrustedDataPolicy",
        "tags": [
          "Trusted Data Policies"
        ],
        "description": "Update a trusted data policy\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:update`: Modify tools, tool configuration, and security policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toolId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "equal",
                            "notEqual",
                            "contains",
                            "notContains",
                            "startsWith",
                            "endsWith",
                            "regex"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "key",
                        "operator",
                        "value"
                      ]
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "block_always",
                      "mark_as_trusted",
                      "mark_as_untrusted",
                      "sanitize_with_dual_llm"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "toolId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "equal",
                              "notEqual",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "regex"
                            ]
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "operator",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "toolId",
                    "description",
                    "conditions",
                    "action",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteTrustedDataPolicy",
        "tags": [
          "Trusted Data Policies"
        ],
        "description": "Delete a trusted data policy\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:delete`: Remove tools and security policies",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:delete"
          ]
        }
      }
    },
    "/api/tool-invocation/bulk-default": {
      "post": {
        "operationId": "bulkUpsertDefaultCallPolicy",
        "tags": [
          "Tool Invocation Policies"
        ],
        "description": "Bulk upsert default tool invocation policies (empty conditions) for multiple tools\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:update`: Modify tools, tool configuration, and security policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toolIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "allow_when_context_is_untrusted",
                      "block_when_context_is_untrusted",
                      "block_always",
                      "require_approval"
                    ]
                  }
                },
                "required": [
                  "toolIds",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "number"
                    },
                    "created": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "updated",
                    "created"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:update"
          ]
        }
      }
    },
    "/api/trusted-data-policies/bulk-default": {
      "post": {
        "operationId": "bulkUpsertDefaultResultPolicy",
        "tags": [
          "Trusted Data Policies"
        ],
        "description": "Bulk upsert default trusted data policies (empty conditions) for multiple tools\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:update`: Modify tools, tool configuration, and security policies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toolIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "mark_as_trusted",
                      "mark_as_untrusted",
                      "block_always",
                      "sanitize_with_dual_llm"
                    ]
                  }
                },
                "required": [
                  "toolIds",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "number"
                    },
                    "created": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "updated",
                    "created"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:update"
          ]
        }
      }
    },
    "/v1/azure/embeddings": {
      "post": {
        "operationId": "azureEmbeddingsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Azure AI Foundry (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/azure/{agentId}/embeddings": {
      "post": {
        "operationId": "azureEmbeddingsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Azure AI Foundry for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/azure/chat/completions": {
      "post": {
        "operationId": "azureChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Azure AI Foundry (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for Azure AI Foundry"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "finish_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "length",
                                  "tool_calls",
                                  "content_filter",
                                  "function_call"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "index": {
                            "type": "number"
                          },
                          "logprobs": {
                            "nullable": true
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "refusal": {
                                "nullable": true,
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "annotations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              },
                              "audio": {
                                "nullable": true
                              },
                              "function_call": {
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "reasoning_content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "tool_calls": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "input": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "input",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                }
                              }
                            },
                            "required": [
                              "role"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                          }
                        },
                        "required": [
                          "finish_reason",
                          "logprobs",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                      }
                    },
                    "created": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "chat.completion"
                      ]
                    },
                    "server_tier": {
                      "type": "string"
                    },
                    "system_fingerprint": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "completion_tokens": {
                          "type": "number"
                        },
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        },
                        "completion_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                        },
                        "prompt_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                        }
                      },
                      "required": [
                        "completion_tokens",
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                    }
                  },
                  "required": [
                    "id",
                    "choices",
                    "created",
                    "model",
                    "object"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/azure/responses": {
      "post": {
        "operationId": "azureResponsesWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response with Azure AI Foundry (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {},
                "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
              }
            }
          },
          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for Azure AI Foundry"
          }
        ],
        "responses": {
          "200": {
            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "model",
                    "output",
                    "status"
                  ],
                  "additionalProperties": {},
                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/azure/{agentId}/responses": {
      "post": {
        "operationId": "azureResponsesWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response with Azure AI Foundry for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {},
                "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
              }
            }
          },
          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for Azure AI Foundry"
          }
        ],
        "responses": {
          "200": {
            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "model",
                    "output",
                    "status"
                  ],
                  "additionalProperties": {},
                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/azure/{agentId}/chat/completions": {
      "post": {
        "operationId": "azureChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Azure AI Foundry for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for Azure AI Foundry"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "finish_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "length",
                                  "tool_calls",
                                  "content_filter",
                                  "function_call"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "index": {
                            "type": "number"
                          },
                          "logprobs": {
                            "nullable": true
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "refusal": {
                                "nullable": true,
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "annotations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              },
                              "audio": {
                                "nullable": true
                              },
                              "function_call": {
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "reasoning_content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "tool_calls": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "input": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "input",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                }
                              }
                            },
                            "required": [
                              "role"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                          }
                        },
                        "required": [
                          "finish_reason",
                          "logprobs",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                      }
                    },
                    "created": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "chat.completion"
                      ]
                    },
                    "server_tier": {
                      "type": "string"
                    },
                    "system_fingerprint": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "completion_tokens": {
                          "type": "number"
                        },
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        },
                        "completion_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                        },
                        "prompt_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                        }
                      },
                      "required": [
                        "completion_tokens",
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                    }
                  },
                  "required": [
                    "id",
                    "choices",
                    "created",
                    "model",
                    "object"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/bedrock/openai/chat/completions": {
      "post": {
        "operationId": "bedrockOpenaiChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Call Amazon Bedrock models using the OpenAI ChatCompletions wire format (default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/v1/bedrock/openai/{agentId}/chat/completions": {
      "post": {
        "operationId": "bedrockOpenaiChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Call Amazon Bedrock models using the OpenAI ChatCompletions wire format (specific agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/v1/bedrock/openai/models": {
      "get": {
        "operationId": "bedrockOpenaiListModelsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List Amazon Bedrock models (via ListInferenceProfiles) in OpenAI models-list format\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token: Archestra virtual API key for Bedrock"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/bedrock/openai/{agentId}/models": {
      "get": {
        "operationId": "bedrockOpenaiListModelsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List Amazon Bedrock models (via ListInferenceProfiles) in OpenAI models-list format (specific agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token: Archestra virtual API key for Bedrock"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/bedrock/converse": {
      "post": {
        "operationId": "bedrockConverseWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Send a message to Amazon Bedrock using the default agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelId": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "image": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "png",
                                          "jpeg",
                                          "gif",
                                          "webp"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "image"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "document": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "pdf",
                                          "csv",
                                          "doc",
                                          "docx",
                                          "xls",
                                          "xlsx",
                                          "html",
                                          "txt",
                                          "md"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "name",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "document"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "guardContent": {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "qualifiers": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "grounding_source",
                                                "query",
                                                "guard_content"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                },
                                "required": [
                                  "guardContent"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolUse": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "name",
                                      "input"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolUse"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolResult": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "image": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "png",
                                                        "jpeg",
                                                        "gif",
                                                        "webp"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "image"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "json": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              },
                                              "required": [
                                                "json"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "document": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pdf",
                                                        "csv",
                                                        "doc",
                                                        "docx",
                                                        "xls",
                                                        "xlsx",
                                                        "html",
                                                        "txt",
                                                        "md"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "name",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "document"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "success",
                                          "error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "content"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolResult"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "cachePoint": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      },
                                      "ttl": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ]
                                  }
                                },
                                "required": [
                                  "cachePoint"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "reasoningContent": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "reasoningText": {
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "string"
                                              },
                                              "signature": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "text"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "reasoningText"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "redactedReasoning": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "data"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "redactedReasoning"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "reasoningContent"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    }
                  },
                  "system": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "guardContent": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "qualifiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "grounding_source",
                                          "query",
                                          "guard_content"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              "required": [
                                "text"
                              ]
                            }
                          },
                          "required": [
                            "guardContent"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "cachePoint": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "ttl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "required": [
                            "cachePoint"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "inferenceConfig": {
                    "type": "object",
                    "properties": {
                      "maxTokens": {
                        "type": "number"
                      },
                      "temperature": {
                        "type": "number"
                      },
                      "topP": {
                        "type": "number"
                      },
                      "stopSequences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "toolConfig": {
                    "type": "object",
                    "properties": {
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "toolSpec": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "inputSchema": {
                                  "type": "object",
                                  "properties": {
                                    "json": {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "json"
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "inputSchema"
                              ]
                            }
                          },
                          "required": [
                            "toolSpec"
                          ]
                        }
                      },
                      "toolChoice": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ]
                              }
                            },
                            "required": [
                              "tool"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "any": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "any"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "auto": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "auto"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "required": [
                      "tools"
                    ]
                  },
                  "guardrailConfig": {
                    "type": "object",
                    "properties": {
                      "guardrailIdentifier": {
                        "type": "string"
                      },
                      "guardrailVersion": {
                        "type": "string"
                      },
                      "trace": {
                        "type": "string",
                        "enum": [
                          "enabled",
                          "disabled"
                        ]
                      }
                    },
                    "required": [
                      "guardrailIdentifier",
                      "guardrailVersion"
                    ]
                  },
                  "additionalModelRequestFields": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "additionalModelResponseFieldPaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "promptVariables": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "json": {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "json"
                          ]
                        }
                      ]
                    }
                  },
                  "performanceConfig": {
                    "type": "object",
                    "properties": {
                      "latency": {
                        "type": "string",
                        "enum": [
                          "optimized"
                        ]
                      }
                    }
                  },
                  "serviceTier": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "default",
                          "throughput"
                        ]
                      }
                    }
                  },
                  "requestMetadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "modelId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "$metadata": {
                      "type": "object",
                      "properties": {
                        "httpStatusCode": {
                          "type": "number"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "attempts": {
                          "type": "number"
                        },
                        "totalRetryDelay": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    },
                    "output": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "content": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "toolUse": {
                                        "type": "object",
                                        "properties": {
                                          "toolUseId": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "input": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": [
                                          "toolUseId",
                                          "name",
                                          "input"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "toolUse"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "role",
                            "content"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    "stopReason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "end_turn",
                            "tool_use",
                            "max_tokens",
                            "stop_sequence",
                            "guardrail_intervened",
                            "content_filtered",
                            "malformed_model_output",
                            "malformed_tool_use",
                            "model_context_window_exceeded"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "number"
                        },
                        "outputTokens": {
                          "type": "number"
                        },
                        "totalTokens": {
                          "type": "number"
                        },
                        "cacheReadInputTokens": {
                          "type": "number"
                        },
                        "cacheWriteInputTokens": {
                          "type": "number"
                        },
                        "cacheDetails": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ttl": {
                                "type": "string"
                              },
                              "inputTokens": {
                                "type": "number"
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens"
                      ],
                      "additionalProperties": false
                    },
                    "metrics": {
                      "type": "object",
                      "properties": {
                        "latencyMs": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    },
                    "additionalModelResponseFields": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "trace": {
                      "type": "object",
                      "properties": {
                        "guardrail": {
                          "type": "object",
                          "properties": {
                            "inputAssessment": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "outputAssessments": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "modelOutput": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "actionReason": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "promptRouter": {
                          "type": "object",
                          "properties": {
                            "invokedModelId": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    "performanceConfig": {
                      "type": "object",
                      "properties": {
                        "latency": {
                          "type": "string",
                          "enum": [
                            "optimized"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "serviceTier": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "default",
                            "throughput"
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "output",
                    "stopReason",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/bedrock/{agentId}/converse": {
      "post": {
        "operationId": "bedrockConverseWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Send a message to Amazon Bedrock for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelId": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "image": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "png",
                                          "jpeg",
                                          "gif",
                                          "webp"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "image"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "document": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "pdf",
                                          "csv",
                                          "doc",
                                          "docx",
                                          "xls",
                                          "xlsx",
                                          "html",
                                          "txt",
                                          "md"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "name",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "document"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "guardContent": {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "qualifiers": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "grounding_source",
                                                "query",
                                                "guard_content"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                },
                                "required": [
                                  "guardContent"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolUse": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "name",
                                      "input"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolUse"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolResult": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "image": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "png",
                                                        "jpeg",
                                                        "gif",
                                                        "webp"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "image"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "json": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              },
                                              "required": [
                                                "json"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "document": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pdf",
                                                        "csv",
                                                        "doc",
                                                        "docx",
                                                        "xls",
                                                        "xlsx",
                                                        "html",
                                                        "txt",
                                                        "md"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "name",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "document"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "success",
                                          "error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "content"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolResult"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "cachePoint": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      },
                                      "ttl": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ]
                                  }
                                },
                                "required": [
                                  "cachePoint"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "reasoningContent": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "reasoningText": {
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "string"
                                              },
                                              "signature": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "text"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "reasoningText"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "redactedReasoning": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "data"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "redactedReasoning"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "reasoningContent"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    }
                  },
                  "system": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "guardContent": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "qualifiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "grounding_source",
                                          "query",
                                          "guard_content"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              "required": [
                                "text"
                              ]
                            }
                          },
                          "required": [
                            "guardContent"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "cachePoint": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "ttl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "required": [
                            "cachePoint"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "inferenceConfig": {
                    "type": "object",
                    "properties": {
                      "maxTokens": {
                        "type": "number"
                      },
                      "temperature": {
                        "type": "number"
                      },
                      "topP": {
                        "type": "number"
                      },
                      "stopSequences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "toolConfig": {
                    "type": "object",
                    "properties": {
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "toolSpec": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "inputSchema": {
                                  "type": "object",
                                  "properties": {
                                    "json": {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "json"
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "inputSchema"
                              ]
                            }
                          },
                          "required": [
                            "toolSpec"
                          ]
                        }
                      },
                      "toolChoice": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ]
                              }
                            },
                            "required": [
                              "tool"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "any": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "any"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "auto": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "auto"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "required": [
                      "tools"
                    ]
                  },
                  "guardrailConfig": {
                    "type": "object",
                    "properties": {
                      "guardrailIdentifier": {
                        "type": "string"
                      },
                      "guardrailVersion": {
                        "type": "string"
                      },
                      "trace": {
                        "type": "string",
                        "enum": [
                          "enabled",
                          "disabled"
                        ]
                      }
                    },
                    "required": [
                      "guardrailIdentifier",
                      "guardrailVersion"
                    ]
                  },
                  "additionalModelRequestFields": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "additionalModelResponseFieldPaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "promptVariables": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "json": {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "json"
                          ]
                        }
                      ]
                    }
                  },
                  "performanceConfig": {
                    "type": "object",
                    "properties": {
                      "latency": {
                        "type": "string",
                        "enum": [
                          "optimized"
                        ]
                      }
                    }
                  },
                  "serviceTier": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "default",
                          "throughput"
                        ]
                      }
                    }
                  },
                  "requestMetadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "modelId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "$metadata": {
                      "type": "object",
                      "properties": {
                        "httpStatusCode": {
                          "type": "number"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "attempts": {
                          "type": "number"
                        },
                        "totalRetryDelay": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    },
                    "output": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "content": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "toolUse": {
                                        "type": "object",
                                        "properties": {
                                          "toolUseId": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "input": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": [
                                          "toolUseId",
                                          "name",
                                          "input"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "toolUse"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "role",
                            "content"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    "stopReason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "end_turn",
                            "tool_use",
                            "max_tokens",
                            "stop_sequence",
                            "guardrail_intervened",
                            "content_filtered",
                            "malformed_model_output",
                            "malformed_tool_use",
                            "model_context_window_exceeded"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "number"
                        },
                        "outputTokens": {
                          "type": "number"
                        },
                        "totalTokens": {
                          "type": "number"
                        },
                        "cacheReadInputTokens": {
                          "type": "number"
                        },
                        "cacheWriteInputTokens": {
                          "type": "number"
                        },
                        "cacheDetails": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ttl": {
                                "type": "string"
                              },
                              "inputTokens": {
                                "type": "number"
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens"
                      ],
                      "additionalProperties": false
                    },
                    "metrics": {
                      "type": "object",
                      "properties": {
                        "latencyMs": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    },
                    "additionalModelResponseFields": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "trace": {
                      "type": "object",
                      "properties": {
                        "guardrail": {
                          "type": "object",
                          "properties": {
                            "inputAssessment": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "outputAssessments": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "modelOutput": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "actionReason": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "promptRouter": {
                          "type": "object",
                          "properties": {
                            "invokedModelId": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    "performanceConfig": {
                      "type": "object",
                      "properties": {
                        "latency": {
                          "type": "string",
                          "enum": [
                            "optimized"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "serviceTier": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "default",
                            "throughput"
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "output",
                    "stopReason",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/bedrock/converse-stream": {
      "post": {
        "operationId": "bedrockConverseStreamWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Stream a message response from Amazon Bedrock using the default agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelId": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "image": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "png",
                                          "jpeg",
                                          "gif",
                                          "webp"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "image"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "document": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "pdf",
                                          "csv",
                                          "doc",
                                          "docx",
                                          "xls",
                                          "xlsx",
                                          "html",
                                          "txt",
                                          "md"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "name",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "document"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "guardContent": {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "qualifiers": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "grounding_source",
                                                "query",
                                                "guard_content"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                },
                                "required": [
                                  "guardContent"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolUse": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "name",
                                      "input"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolUse"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolResult": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "image": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "png",
                                                        "jpeg",
                                                        "gif",
                                                        "webp"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "image"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "json": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              },
                                              "required": [
                                                "json"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "document": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pdf",
                                                        "csv",
                                                        "doc",
                                                        "docx",
                                                        "xls",
                                                        "xlsx",
                                                        "html",
                                                        "txt",
                                                        "md"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "name",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "document"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "success",
                                          "error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "content"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolResult"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "cachePoint": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      },
                                      "ttl": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ]
                                  }
                                },
                                "required": [
                                  "cachePoint"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "reasoningContent": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "reasoningText": {
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "string"
                                              },
                                              "signature": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "text"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "reasoningText"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "redactedReasoning": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "data"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "redactedReasoning"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "reasoningContent"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    }
                  },
                  "system": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "guardContent": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "qualifiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "grounding_source",
                                          "query",
                                          "guard_content"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              "required": [
                                "text"
                              ]
                            }
                          },
                          "required": [
                            "guardContent"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "cachePoint": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "ttl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "required": [
                            "cachePoint"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "inferenceConfig": {
                    "type": "object",
                    "properties": {
                      "maxTokens": {
                        "type": "number"
                      },
                      "temperature": {
                        "type": "number"
                      },
                      "topP": {
                        "type": "number"
                      },
                      "stopSequences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "toolConfig": {
                    "type": "object",
                    "properties": {
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "toolSpec": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "inputSchema": {
                                  "type": "object",
                                  "properties": {
                                    "json": {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "json"
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "inputSchema"
                              ]
                            }
                          },
                          "required": [
                            "toolSpec"
                          ]
                        }
                      },
                      "toolChoice": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ]
                              }
                            },
                            "required": [
                              "tool"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "any": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "any"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "auto": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "auto"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "required": [
                      "tools"
                    ]
                  },
                  "guardrailConfig": {
                    "type": "object",
                    "properties": {
                      "guardrailIdentifier": {
                        "type": "string"
                      },
                      "guardrailVersion": {
                        "type": "string"
                      },
                      "trace": {
                        "type": "string",
                        "enum": [
                          "enabled",
                          "disabled"
                        ]
                      }
                    },
                    "required": [
                      "guardrailIdentifier",
                      "guardrailVersion"
                    ]
                  },
                  "additionalModelRequestFields": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "additionalModelResponseFieldPaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "promptVariables": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "json": {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "json"
                          ]
                        }
                      ]
                    }
                  },
                  "performanceConfig": {
                    "type": "object",
                    "properties": {
                      "latency": {
                        "type": "string",
                        "enum": [
                          "optimized"
                        ]
                      }
                    }
                  },
                  "serviceTier": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "default",
                          "throughput"
                        ]
                      }
                    }
                  },
                  "requestMetadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "modelId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/v1/bedrock/{agentId}/converse-stream": {
      "post": {
        "operationId": "bedrockConverseStreamWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Stream a message response from Amazon Bedrock for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelId": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "image": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "png",
                                          "jpeg",
                                          "gif",
                                          "webp"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "image"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "document": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "pdf",
                                          "csv",
                                          "doc",
                                          "docx",
                                          "xls",
                                          "xlsx",
                                          "html",
                                          "txt",
                                          "md"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "name",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "document"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "guardContent": {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "qualifiers": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "grounding_source",
                                                "query",
                                                "guard_content"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                },
                                "required": [
                                  "guardContent"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolUse": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "name",
                                      "input"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolUse"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolResult": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "image": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "png",
                                                        "jpeg",
                                                        "gif",
                                                        "webp"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "image"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "json": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              },
                                              "required": [
                                                "json"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "document": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pdf",
                                                        "csv",
                                                        "doc",
                                                        "docx",
                                                        "xls",
                                                        "xlsx",
                                                        "html",
                                                        "txt",
                                                        "md"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "name",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "document"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "success",
                                          "error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "content"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolResult"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "cachePoint": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      },
                                      "ttl": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ]
                                  }
                                },
                                "required": [
                                  "cachePoint"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "reasoningContent": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "reasoningText": {
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "string"
                                              },
                                              "signature": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "text"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "reasoningText"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "redactedReasoning": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "data"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "redactedReasoning"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "reasoningContent"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    }
                  },
                  "system": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "guardContent": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "qualifiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "grounding_source",
                                          "query",
                                          "guard_content"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              "required": [
                                "text"
                              ]
                            }
                          },
                          "required": [
                            "guardContent"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "cachePoint": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "ttl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "required": [
                            "cachePoint"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "inferenceConfig": {
                    "type": "object",
                    "properties": {
                      "maxTokens": {
                        "type": "number"
                      },
                      "temperature": {
                        "type": "number"
                      },
                      "topP": {
                        "type": "number"
                      },
                      "stopSequences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "toolConfig": {
                    "type": "object",
                    "properties": {
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "toolSpec": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "inputSchema": {
                                  "type": "object",
                                  "properties": {
                                    "json": {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "json"
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "inputSchema"
                              ]
                            }
                          },
                          "required": [
                            "toolSpec"
                          ]
                        }
                      },
                      "toolChoice": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ]
                              }
                            },
                            "required": [
                              "tool"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "any": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "any"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "auto": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "auto"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "required": [
                      "tools"
                    ]
                  },
                  "guardrailConfig": {
                    "type": "object",
                    "properties": {
                      "guardrailIdentifier": {
                        "type": "string"
                      },
                      "guardrailVersion": {
                        "type": "string"
                      },
                      "trace": {
                        "type": "string",
                        "enum": [
                          "enabled",
                          "disabled"
                        ]
                      }
                    },
                    "required": [
                      "guardrailIdentifier",
                      "guardrailVersion"
                    ]
                  },
                  "additionalModelRequestFields": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "additionalModelResponseFieldPaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "promptVariables": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "json": {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "json"
                          ]
                        }
                      ]
                    }
                  },
                  "performanceConfig": {
                    "type": "object",
                    "properties": {
                      "latency": {
                        "type": "string",
                        "enum": [
                          "optimized"
                        ]
                      }
                    }
                  },
                  "serviceTier": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "default",
                          "throughput"
                        ]
                      }
                    }
                  },
                  "requestMetadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "modelId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/v1/bedrock/{agentId}/model/{modelId}/converse": {
      "post": {
        "operationId": "bedrockConverseWithAgentAndModel",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Send a message to Amazon Bedrock for a specific agent (AI SDK format)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelId": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "image": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "png",
                                          "jpeg",
                                          "gif",
                                          "webp"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "image"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "document": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "pdf",
                                          "csv",
                                          "doc",
                                          "docx",
                                          "xls",
                                          "xlsx",
                                          "html",
                                          "txt",
                                          "md"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "name",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "document"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "guardContent": {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "qualifiers": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "grounding_source",
                                                "query",
                                                "guard_content"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                },
                                "required": [
                                  "guardContent"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolUse": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "name",
                                      "input"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolUse"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolResult": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "image": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "png",
                                                        "jpeg",
                                                        "gif",
                                                        "webp"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "image"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "json": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              },
                                              "required": [
                                                "json"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "document": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pdf",
                                                        "csv",
                                                        "doc",
                                                        "docx",
                                                        "xls",
                                                        "xlsx",
                                                        "html",
                                                        "txt",
                                                        "md"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "name",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "document"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "success",
                                          "error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "content"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolResult"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "cachePoint": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      },
                                      "ttl": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ]
                                  }
                                },
                                "required": [
                                  "cachePoint"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "reasoningContent": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "reasoningText": {
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "string"
                                              },
                                              "signature": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "text"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "reasoningText"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "redactedReasoning": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "data"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "redactedReasoning"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "reasoningContent"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    }
                  },
                  "system": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "guardContent": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "qualifiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "grounding_source",
                                          "query",
                                          "guard_content"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              "required": [
                                "text"
                              ]
                            }
                          },
                          "required": [
                            "guardContent"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "cachePoint": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "ttl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "required": [
                            "cachePoint"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "inferenceConfig": {
                    "type": "object",
                    "properties": {
                      "maxTokens": {
                        "type": "number"
                      },
                      "temperature": {
                        "type": "number"
                      },
                      "topP": {
                        "type": "number"
                      },
                      "stopSequences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "toolConfig": {
                    "type": "object",
                    "properties": {
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "toolSpec": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "inputSchema": {
                                  "type": "object",
                                  "properties": {
                                    "json": {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "json"
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "inputSchema"
                              ]
                            }
                          },
                          "required": [
                            "toolSpec"
                          ]
                        }
                      },
                      "toolChoice": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ]
                              }
                            },
                            "required": [
                              "tool"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "any": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "any"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "auto": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "auto"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "required": [
                      "tools"
                    ]
                  },
                  "guardrailConfig": {
                    "type": "object",
                    "properties": {
                      "guardrailIdentifier": {
                        "type": "string"
                      },
                      "guardrailVersion": {
                        "type": "string"
                      },
                      "trace": {
                        "type": "string",
                        "enum": [
                          "enabled",
                          "disabled"
                        ]
                      }
                    },
                    "required": [
                      "guardrailIdentifier",
                      "guardrailVersion"
                    ]
                  },
                  "additionalModelRequestFields": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "additionalModelResponseFieldPaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "promptVariables": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "json": {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "json"
                          ]
                        }
                      ]
                    }
                  },
                  "performanceConfig": {
                    "type": "object",
                    "properties": {
                      "latency": {
                        "type": "string",
                        "enum": [
                          "optimized"
                        ]
                      }
                    }
                  },
                  "serviceTier": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "default",
                          "throughput"
                        ]
                      }
                    }
                  },
                  "requestMetadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "modelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "$metadata": {
                      "type": "object",
                      "properties": {
                        "httpStatusCode": {
                          "type": "number"
                        },
                        "requestId": {
                          "type": "string"
                        },
                        "attempts": {
                          "type": "number"
                        },
                        "totalRetryDelay": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    },
                    "output": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "content": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "toolUse": {
                                        "type": "object",
                                        "properties": {
                                          "toolUseId": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "input": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": [
                                          "toolUseId",
                                          "name",
                                          "input"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "toolUse"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "role",
                            "content"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    "stopReason": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "end_turn",
                            "tool_use",
                            "max_tokens",
                            "stop_sequence",
                            "guardrail_intervened",
                            "content_filtered",
                            "malformed_model_output",
                            "malformed_tool_use",
                            "model_context_window_exceeded"
                          ]
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "inputTokens": {
                          "type": "number"
                        },
                        "outputTokens": {
                          "type": "number"
                        },
                        "totalTokens": {
                          "type": "number"
                        },
                        "cacheReadInputTokens": {
                          "type": "number"
                        },
                        "cacheWriteInputTokens": {
                          "type": "number"
                        },
                        "cacheDetails": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "ttl": {
                                "type": "string"
                              },
                              "inputTokens": {
                                "type": "number"
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "inputTokens",
                        "outputTokens"
                      ],
                      "additionalProperties": false
                    },
                    "metrics": {
                      "type": "object",
                      "properties": {
                        "latencyMs": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false
                    },
                    "additionalModelResponseFields": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "trace": {
                      "type": "object",
                      "properties": {
                        "guardrail": {
                          "type": "object",
                          "properties": {
                            "inputAssessment": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "outputAssessments": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "modelOutput": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "actionReason": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "promptRouter": {
                          "type": "object",
                          "properties": {
                            "invokedModelId": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    },
                    "performanceConfig": {
                      "type": "object",
                      "properties": {
                        "latency": {
                          "type": "string",
                          "enum": [
                            "optimized"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "serviceTier": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "default",
                            "throughput"
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "output",
                    "stopReason",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/bedrock/{agentId}/model/{modelId}/converse-stream": {
      "post": {
        "operationId": "bedrockConverseStreamWithAgentAndModel",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Stream a message response from Amazon Bedrock for a specific agent (AI SDK format)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelId": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "image": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "png",
                                          "jpeg",
                                          "gif",
                                          "webp"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "image"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "document": {
                                    "type": "object",
                                    "properties": {
                                      "format": {
                                        "type": "string",
                                        "enum": [
                                          "pdf",
                                          "csv",
                                          "doc",
                                          "docx",
                                          "xls",
                                          "xlsx",
                                          "html",
                                          "txt",
                                          "md"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "bytes": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "bytes"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "s3Location": {
                                                "type": "object",
                                                "properties": {
                                                  "uri": {
                                                    "type": "string"
                                                  },
                                                  "bucketOwner": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "uri"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "s3Location"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "format",
                                      "name",
                                      "source"
                                    ]
                                  }
                                },
                                "required": [
                                  "document"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "guardContent": {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          },
                                          "qualifiers": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "grounding_source",
                                                "query",
                                                "guard_content"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "text"
                                    ]
                                  }
                                },
                                "required": [
                                  "guardContent"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolUse": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "name",
                                      "input"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolUse"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "toolResult": {
                                    "type": "object",
                                    "properties": {
                                      "toolUseId": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "image": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "png",
                                                        "jpeg",
                                                        "gif",
                                                        "webp"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "image"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "json": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              },
                                              "required": [
                                                "json"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "document": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pdf",
                                                        "csv",
                                                        "doc",
                                                        "docx",
                                                        "xls",
                                                        "xlsx",
                                                        "html",
                                                        "txt",
                                                        "md"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "name",
                                                    "source"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "document"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "success",
                                          "error"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "toolUseId",
                                      "content"
                                    ]
                                  }
                                },
                                "required": [
                                  "toolResult"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "cachePoint": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      },
                                      "ttl": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ]
                                  }
                                },
                                "required": [
                                  "cachePoint"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "reasoningContent": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "reasoningText": {
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "string"
                                              },
                                              "signature": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "text"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "reasoningText"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "redactedReasoning": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "data"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "redactedReasoning"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "reasoningContent"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    }
                  },
                  "system": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "guardContent": {
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "qualifiers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "enum": [
                                          "grounding_source",
                                          "query",
                                          "guard_content"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ]
                                }
                              },
                              "required": [
                                "text"
                              ]
                            }
                          },
                          "required": [
                            "guardContent"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "cachePoint": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "ttl": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          },
                          "required": [
                            "cachePoint"
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "inferenceConfig": {
                    "type": "object",
                    "properties": {
                      "maxTokens": {
                        "type": "number"
                      },
                      "temperature": {
                        "type": "number"
                      },
                      "topP": {
                        "type": "number"
                      },
                      "stopSequences": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "toolConfig": {
                    "type": "object",
                    "properties": {
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "toolSpec": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "inputSchema": {
                                  "type": "object",
                                  "properties": {
                                    "json": {
                                      "type": "object",
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "json"
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "inputSchema"
                              ]
                            }
                          },
                          "required": [
                            "toolSpec"
                          ]
                        }
                      },
                      "toolChoice": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ]
                              }
                            },
                            "required": [
                              "tool"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "any": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "any"
                            ],
                            "additionalProperties": {}
                          },
                          {
                            "type": "object",
                            "properties": {
                              "auto": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "auto"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "required": [
                      "tools"
                    ]
                  },
                  "guardrailConfig": {
                    "type": "object",
                    "properties": {
                      "guardrailIdentifier": {
                        "type": "string"
                      },
                      "guardrailVersion": {
                        "type": "string"
                      },
                      "trace": {
                        "type": "string",
                        "enum": [
                          "enabled",
                          "disabled"
                        ]
                      }
                    },
                    "required": [
                      "guardrailIdentifier",
                      "guardrailVersion"
                    ]
                  },
                  "additionalModelRequestFields": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "additionalModelResponseFieldPaths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "promptVariables": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "json": {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "json"
                          ]
                        }
                      ]
                    }
                  },
                  "performanceConfig": {
                    "type": "object",
                    "properties": {
                      "latency": {
                        "type": "string",
                        "enum": [
                          "optimized"
                        ]
                      }
                    }
                  },
                  "serviceTier": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "default",
                          "throughput"
                        ]
                      }
                    }
                  },
                  "requestMetadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "modelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/v1/bedrock/model/{modelId}/invoke": {
      "post": {
        "operationId": "bedrockInvokeWithDefaultAgentAndModel",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Invoke an Anthropic model on Amazon Bedrock (Anthropic Messages format, default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      },
                                      "citations": {
                                        "nullable": true,
                                        "type": "array",
                                        "items": {}
                                      }
                                    },
                                    "required": [
                                      "text",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "base64"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string"
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "url"
                                                ]
                                              },
                                              "url": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ]
                                          }
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "source"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "document"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "base64"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string",
                                                "enum": [
                                                  "application/pdf"
                                                ]
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "text"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string",
                                                "enum": [
                                                  "text/plain"
                                                ]
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "url"
                                                ]
                                              },
                                              "url": {
                                                "type": "string",
                                                "format": "uri"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "content"
                                                ]
                                              },
                                              "content": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "text": {
                                                              "type": "string"
                                                            },
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "cache_control": {
                                                              "nullable": true
                                                            },
                                                            "citations": {
                                                              "nullable": true,
                                                              "type": "array",
                                                              "items": {}
                                                            }
                                                          },
                                                          "required": [
                                                            "text",
                                                            "type"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "image"
                                                              ]
                                                            },
                                                            "source": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "type": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "base64"
                                                                      ]
                                                                    },
                                                                    "media_type": {
                                                                      "type": "string"
                                                                    },
                                                                    "data": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "type",
                                                                    "media_type",
                                                                    "data"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "type": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "url"
                                                                      ]
                                                                    },
                                                                    "url": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "type",
                                                                    "url"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            "cache_control": {
                                                              "nullable": true
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "source"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "content"
                                            ]
                                          }
                                        ]
                                      },
                                      "title": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "context": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "citations": {
                                        "nullable": true,
                                        "type": "object",
                                        "properties": {
                                          "enabled": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "enabled"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "source"
                                    ],
                                    "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "thinking"
                                        ]
                                      },
                                      "thinking": {
                                        "type": "string"
                                      },
                                      "signature": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "thinking",
                                      "signature"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "redacted_thinking"
                                        ]
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "data"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "input": {},
                                      "name": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "tool_use"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "input",
                                      "name",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "tool_use_id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      },
                                      "content": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "array",
                                                      "items": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "type"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string"
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "document"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "application/pdf"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text/plain"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string",
                                                              "format": "uri"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "content"
                                                              ]
                                                            },
                                                            "content": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "text": {
                                                                            "type": "string"
                                                                          },
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text"
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          },
                                                                          "citations": {
                                                                            "nullable": true,
                                                                            "type": "array",
                                                                            "items": {}
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "text",
                                                                          "type"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "image"
                                                                            ]
                                                                          },
                                                                          "source": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "base64"
                                                                                    ]
                                                                                  },
                                                                                  "media_type": {
                                                                                    "type": "string"
                                                                                  },
                                                                                  "data": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "media_type",
                                                                                  "data"
                                                                                ]
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "url"
                                                                                    ]
                                                                                  },
                                                                                  "url": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "url"
                                                                                ]
                                                                              }
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "source"
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "content"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "title": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "context": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "object",
                                                      "properties": {
                                                        "enabled": {
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "enabled"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      },
                                      "is_error": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "tool_use_id",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "search_result",
                                          "server_tool_use",
                                          "web_search_tool_result",
                                          "web_fetch_tool_result",
                                          "code_execution_tool_result",
                                          "bash_code_execution_tool_result",
                                          "text_editor_code_execution_tool_result",
                                          "tool_search_tool_result",
                                          "container_upload"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant",
                            "system"
                          ]
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ]
                    }
                  },
                  "max_tokens": {
                    "type": "number"
                  },
                  "container": {
                    "nullable": true,
                    "type": "string"
                  },
                  "context_management": {
                    "nullable": true,
                    "type": "object",
                    "properties": {}
                  },
                  "mcp_servers": {
                    "type": "array",
                    "items": {}
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "user_id": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "user_id"
                    ]
                  },
                  "output_config": {
                    "type": "object",
                    "properties": {
                      "effort": {
                        "nullable": true,
                        "type": "string"
                      },
                      "format": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "json_schema"
                            ]
                          },
                          "schema": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "type",
                          "schema"
                        ]
                      }
                    }
                  },
                  "service_tier": {},
                  "speed": {
                    "type": "string",
                    "enum": [
                      "fast",
                      "standard"
                    ]
                  },
                  "stop_sequences": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "system": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "text"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "cache_control": {
                            "nullable": true
                          },
                          "citations": {
                            "nullable": true,
                            "type": "array",
                            "items": {}
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "citations": {
                              "nullable": true,
                              "type": "array",
                              "items": {}
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        }
                      }
                    ]
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "thinking": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "budget_tokens": {
                            "type": "number"
                          },
                          "display": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "summarized",
                              "omitted"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "budget_tokens"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "adaptive"
                            ]
                          },
                          "display": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "summarized",
                              "omitted"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "auto"
                            ]
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "any"
                            ]
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "tool"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "none"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "nullable": true,
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "input_schema": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "description": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "input_schema"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "bash"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "bash_20250124"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_editor"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250124"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_based_edit_tool"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250429"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_based_edit_tool"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250728"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "max_characters": {
                              "nullable": true,
                              "type": "number"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "web_search"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_search_20250305"
                              ]
                            },
                            "allowed_domains": {
                              "nullable": true,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "blocked_domains": {
                              "nullable": true,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "max_uses": {
                              "nullable": true,
                              "type": "number"
                            },
                            "user_location": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    }
                  },
                  "top_k": {
                    "type": "number"
                  },
                  "top_p": {
                    "type": "number"
                  },
                  "anthropic_version": {
                    "type": "string"
                  },
                  "anthropic_beta": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "messages",
                  "max_tokens"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "modelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnthropicMessagesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/bedrock/{agentId}/model/{modelId}/invoke": {
      "post": {
        "operationId": "bedrockInvokeWithAgentAndModel",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Invoke an Anthropic model on Amazon Bedrock (Anthropic Messages format) for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      },
                                      "citations": {
                                        "nullable": true,
                                        "type": "array",
                                        "items": {}
                                      }
                                    },
                                    "required": [
                                      "text",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "base64"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string"
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "url"
                                                ]
                                              },
                                              "url": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ]
                                          }
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "source"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "document"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "base64"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string",
                                                "enum": [
                                                  "application/pdf"
                                                ]
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "text"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string",
                                                "enum": [
                                                  "text/plain"
                                                ]
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "url"
                                                ]
                                              },
                                              "url": {
                                                "type": "string",
                                                "format": "uri"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "content"
                                                ]
                                              },
                                              "content": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "text": {
                                                              "type": "string"
                                                            },
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "cache_control": {
                                                              "nullable": true
                                                            },
                                                            "citations": {
                                                              "nullable": true,
                                                              "type": "array",
                                                              "items": {}
                                                            }
                                                          },
                                                          "required": [
                                                            "text",
                                                            "type"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "image"
                                                              ]
                                                            },
                                                            "source": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "type": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "base64"
                                                                      ]
                                                                    },
                                                                    "media_type": {
                                                                      "type": "string"
                                                                    },
                                                                    "data": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "type",
                                                                    "media_type",
                                                                    "data"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "type": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "url"
                                                                      ]
                                                                    },
                                                                    "url": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "type",
                                                                    "url"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            "cache_control": {
                                                              "nullable": true
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "source"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "content"
                                            ]
                                          }
                                        ]
                                      },
                                      "title": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "context": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "citations": {
                                        "nullable": true,
                                        "type": "object",
                                        "properties": {
                                          "enabled": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "enabled"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "source"
                                    ],
                                    "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "thinking"
                                        ]
                                      },
                                      "thinking": {
                                        "type": "string"
                                      },
                                      "signature": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "thinking",
                                      "signature"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "redacted_thinking"
                                        ]
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "data"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "input": {},
                                      "name": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "tool_use"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "input",
                                      "name",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "tool_use_id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      },
                                      "content": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "array",
                                                      "items": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "type"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string"
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "document"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "application/pdf"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text/plain"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string",
                                                              "format": "uri"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "content"
                                                              ]
                                                            },
                                                            "content": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "text": {
                                                                            "type": "string"
                                                                          },
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text"
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          },
                                                                          "citations": {
                                                                            "nullable": true,
                                                                            "type": "array",
                                                                            "items": {}
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "text",
                                                                          "type"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "image"
                                                                            ]
                                                                          },
                                                                          "source": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "base64"
                                                                                    ]
                                                                                  },
                                                                                  "media_type": {
                                                                                    "type": "string"
                                                                                  },
                                                                                  "data": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "media_type",
                                                                                  "data"
                                                                                ]
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "url"
                                                                                    ]
                                                                                  },
                                                                                  "url": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "url"
                                                                                ]
                                                                              }
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "source"
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "content"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "title": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "context": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "object",
                                                      "properties": {
                                                        "enabled": {
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "enabled"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      },
                                      "is_error": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "tool_use_id",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "search_result",
                                          "server_tool_use",
                                          "web_search_tool_result",
                                          "web_fetch_tool_result",
                                          "code_execution_tool_result",
                                          "bash_code_execution_tool_result",
                                          "text_editor_code_execution_tool_result",
                                          "tool_search_tool_result",
                                          "container_upload"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant",
                            "system"
                          ]
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ]
                    }
                  },
                  "max_tokens": {
                    "type": "number"
                  },
                  "container": {
                    "nullable": true,
                    "type": "string"
                  },
                  "context_management": {
                    "nullable": true,
                    "type": "object",
                    "properties": {}
                  },
                  "mcp_servers": {
                    "type": "array",
                    "items": {}
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "user_id": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "user_id"
                    ]
                  },
                  "output_config": {
                    "type": "object",
                    "properties": {
                      "effort": {
                        "nullable": true,
                        "type": "string"
                      },
                      "format": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "json_schema"
                            ]
                          },
                          "schema": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "type",
                          "schema"
                        ]
                      }
                    }
                  },
                  "service_tier": {},
                  "speed": {
                    "type": "string",
                    "enum": [
                      "fast",
                      "standard"
                    ]
                  },
                  "stop_sequences": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "system": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "text"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "cache_control": {
                            "nullable": true
                          },
                          "citations": {
                            "nullable": true,
                            "type": "array",
                            "items": {}
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "citations": {
                              "nullable": true,
                              "type": "array",
                              "items": {}
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        }
                      }
                    ]
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "thinking": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "budget_tokens": {
                            "type": "number"
                          },
                          "display": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "summarized",
                              "omitted"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "budget_tokens"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "adaptive"
                            ]
                          },
                          "display": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "summarized",
                              "omitted"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "auto"
                            ]
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "any"
                            ]
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "tool"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "none"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "nullable": true,
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "input_schema": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "description": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "input_schema"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "bash"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "bash_20250124"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_editor"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250124"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_based_edit_tool"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250429"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_based_edit_tool"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250728"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "max_characters": {
                              "nullable": true,
                              "type": "number"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "web_search"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_search_20250305"
                              ]
                            },
                            "allowed_domains": {
                              "nullable": true,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "blocked_domains": {
                              "nullable": true,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "max_uses": {
                              "nullable": true,
                              "type": "number"
                            },
                            "user_location": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    }
                  },
                  "top_k": {
                    "type": "number"
                  },
                  "top_p": {
                    "type": "number"
                  },
                  "anthropic_version": {
                    "type": "string"
                  },
                  "anthropic_beta": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "messages",
                  "max_tokens"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "modelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnthropicMessagesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/bedrock/model/{modelId}/invoke-with-response-stream": {
      "post": {
        "operationId": "bedrockInvokeStreamWithDefaultAgentAndModel",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Stream an Anthropic model response from Amazon Bedrock (Anthropic Messages format, default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      },
                                      "citations": {
                                        "nullable": true,
                                        "type": "array",
                                        "items": {}
                                      }
                                    },
                                    "required": [
                                      "text",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "base64"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string"
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "url"
                                                ]
                                              },
                                              "url": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ]
                                          }
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "source"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "document"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "base64"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string",
                                                "enum": [
                                                  "application/pdf"
                                                ]
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "text"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string",
                                                "enum": [
                                                  "text/plain"
                                                ]
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "url"
                                                ]
                                              },
                                              "url": {
                                                "type": "string",
                                                "format": "uri"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "content"
                                                ]
                                              },
                                              "content": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "text": {
                                                              "type": "string"
                                                            },
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "cache_control": {
                                                              "nullable": true
                                                            },
                                                            "citations": {
                                                              "nullable": true,
                                                              "type": "array",
                                                              "items": {}
                                                            }
                                                          },
                                                          "required": [
                                                            "text",
                                                            "type"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "image"
                                                              ]
                                                            },
                                                            "source": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "type": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "base64"
                                                                      ]
                                                                    },
                                                                    "media_type": {
                                                                      "type": "string"
                                                                    },
                                                                    "data": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "type",
                                                                    "media_type",
                                                                    "data"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "type": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "url"
                                                                      ]
                                                                    },
                                                                    "url": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "type",
                                                                    "url"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            "cache_control": {
                                                              "nullable": true
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "source"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "content"
                                            ]
                                          }
                                        ]
                                      },
                                      "title": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "context": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "citations": {
                                        "nullable": true,
                                        "type": "object",
                                        "properties": {
                                          "enabled": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "enabled"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "source"
                                    ],
                                    "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "thinking"
                                        ]
                                      },
                                      "thinking": {
                                        "type": "string"
                                      },
                                      "signature": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "thinking",
                                      "signature"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "redacted_thinking"
                                        ]
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "data"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "input": {},
                                      "name": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "tool_use"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "input",
                                      "name",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "tool_use_id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      },
                                      "content": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "array",
                                                      "items": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "type"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string"
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "document"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "application/pdf"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text/plain"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string",
                                                              "format": "uri"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "content"
                                                              ]
                                                            },
                                                            "content": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "text": {
                                                                            "type": "string"
                                                                          },
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text"
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          },
                                                                          "citations": {
                                                                            "nullable": true,
                                                                            "type": "array",
                                                                            "items": {}
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "text",
                                                                          "type"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "image"
                                                                            ]
                                                                          },
                                                                          "source": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "base64"
                                                                                    ]
                                                                                  },
                                                                                  "media_type": {
                                                                                    "type": "string"
                                                                                  },
                                                                                  "data": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "media_type",
                                                                                  "data"
                                                                                ]
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "url"
                                                                                    ]
                                                                                  },
                                                                                  "url": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "url"
                                                                                ]
                                                                              }
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "source"
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "content"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "title": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "context": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "object",
                                                      "properties": {
                                                        "enabled": {
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "enabled"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      },
                                      "is_error": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "tool_use_id",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "search_result",
                                          "server_tool_use",
                                          "web_search_tool_result",
                                          "web_fetch_tool_result",
                                          "code_execution_tool_result",
                                          "bash_code_execution_tool_result",
                                          "text_editor_code_execution_tool_result",
                                          "tool_search_tool_result",
                                          "container_upload"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant",
                            "system"
                          ]
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ]
                    }
                  },
                  "max_tokens": {
                    "type": "number"
                  },
                  "container": {
                    "nullable": true,
                    "type": "string"
                  },
                  "context_management": {
                    "nullable": true,
                    "type": "object",
                    "properties": {}
                  },
                  "mcp_servers": {
                    "type": "array",
                    "items": {}
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "user_id": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "user_id"
                    ]
                  },
                  "output_config": {
                    "type": "object",
                    "properties": {
                      "effort": {
                        "nullable": true,
                        "type": "string"
                      },
                      "format": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "json_schema"
                            ]
                          },
                          "schema": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "type",
                          "schema"
                        ]
                      }
                    }
                  },
                  "service_tier": {},
                  "speed": {
                    "type": "string",
                    "enum": [
                      "fast",
                      "standard"
                    ]
                  },
                  "stop_sequences": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "system": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "text"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "cache_control": {
                            "nullable": true
                          },
                          "citations": {
                            "nullable": true,
                            "type": "array",
                            "items": {}
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "citations": {
                              "nullable": true,
                              "type": "array",
                              "items": {}
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        }
                      }
                    ]
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "thinking": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "budget_tokens": {
                            "type": "number"
                          },
                          "display": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "summarized",
                              "omitted"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "budget_tokens"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "adaptive"
                            ]
                          },
                          "display": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "summarized",
                              "omitted"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "auto"
                            ]
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "any"
                            ]
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "tool"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "none"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "nullable": true,
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "input_schema": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "description": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "input_schema"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "bash"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "bash_20250124"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_editor"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250124"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_based_edit_tool"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250429"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_based_edit_tool"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250728"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "max_characters": {
                              "nullable": true,
                              "type": "number"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "web_search"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_search_20250305"
                              ]
                            },
                            "allowed_domains": {
                              "nullable": true,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "blocked_domains": {
                              "nullable": true,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "max_uses": {
                              "nullable": true,
                              "type": "number"
                            },
                            "user_location": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    }
                  },
                  "top_k": {
                    "type": "number"
                  },
                  "top_p": {
                    "type": "number"
                  },
                  "anthropic_version": {
                    "type": "string"
                  },
                  "anthropic_beta": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "messages",
                  "max_tokens"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "modelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/v1/bedrock/{agentId}/model/{modelId}/invoke-with-response-stream": {
      "post": {
        "operationId": "bedrockInvokeStreamWithAgentAndModel",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Stream an Anthropic model response from Amazon Bedrock (Anthropic Messages format) for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "text": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      },
                                      "citations": {
                                        "nullable": true,
                                        "type": "array",
                                        "items": {}
                                      }
                                    },
                                    "required": [
                                      "text",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "image"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "base64"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string"
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "url"
                                                ]
                                              },
                                              "url": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ]
                                          }
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "source"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "document"
                                        ]
                                      },
                                      "source": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "base64"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string",
                                                "enum": [
                                                  "application/pdf"
                                                ]
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "text"
                                                ]
                                              },
                                              "media_type": {
                                                "type": "string",
                                                "enum": [
                                                  "text/plain"
                                                ]
                                              },
                                              "data": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "media_type",
                                              "data"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "url"
                                                ]
                                              },
                                              "url": {
                                                "type": "string",
                                                "format": "uri"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "url"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "content"
                                                ]
                                              },
                                              "content": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "array",
                                                    "items": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "text": {
                                                              "type": "string"
                                                            },
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "cache_control": {
                                                              "nullable": true
                                                            },
                                                            "citations": {
                                                              "nullable": true,
                                                              "type": "array",
                                                              "items": {}
                                                            }
                                                          },
                                                          "required": [
                                                            "text",
                                                            "type"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "image"
                                                              ]
                                                            },
                                                            "source": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "type": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "base64"
                                                                      ]
                                                                    },
                                                                    "media_type": {
                                                                      "type": "string"
                                                                    },
                                                                    "data": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "type",
                                                                    "media_type",
                                                                    "data"
                                                                  ]
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "type": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "url"
                                                                      ]
                                                                    },
                                                                    "url": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "type",
                                                                    "url"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            "cache_control": {
                                                              "nullable": true
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "source"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "content"
                                            ]
                                          }
                                        ]
                                      },
                                      "title": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "context": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "citations": {
                                        "nullable": true,
                                        "type": "object",
                                        "properties": {
                                          "enabled": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "enabled"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "source"
                                    ],
                                    "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "thinking"
                                        ]
                                      },
                                      "thinking": {
                                        "type": "string"
                                      },
                                      "signature": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "thinking",
                                      "signature"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "redacted_thinking"
                                        ]
                                      },
                                      "data": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "data"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "input": {},
                                      "name": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "tool_use"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "input",
                                      "name",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "tool_use_id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "cache_control": {
                                        "nullable": true
                                      },
                                      "content": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "array",
                                                      "items": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "type"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string"
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "document"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "application/pdf"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text/plain"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string",
                                                              "format": "uri"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ]
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "content"
                                                              ]
                                                            },
                                                            "content": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "text": {
                                                                            "type": "string"
                                                                          },
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text"
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          },
                                                                          "citations": {
                                                                            "nullable": true,
                                                                            "type": "array",
                                                                            "items": {}
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "text",
                                                                          "type"
                                                                        ]
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "image"
                                                                            ]
                                                                          },
                                                                          "source": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "base64"
                                                                                    ]
                                                                                  },
                                                                                  "media_type": {
                                                                                    "type": "string"
                                                                                  },
                                                                                  "data": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "media_type",
                                                                                  "data"
                                                                                ]
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "url"
                                                                                    ]
                                                                                  },
                                                                                  "url": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "url"
                                                                                ]
                                                                              }
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "source"
                                                                        ]
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "content"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    "title": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "context": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "object",
                                                      "properties": {
                                                        "enabled": {
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "enabled"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      },
                                      "is_error": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "tool_use_id",
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "search_result",
                                          "server_tool_use",
                                          "web_search_tool_result",
                                          "web_fetch_tool_result",
                                          "code_execution_tool_result",
                                          "bash_code_execution_tool_result",
                                          "text_editor_code_execution_tool_result",
                                          "tool_search_tool_result",
                                          "container_upload"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant",
                            "system"
                          ]
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ]
                    }
                  },
                  "max_tokens": {
                    "type": "number"
                  },
                  "container": {
                    "nullable": true,
                    "type": "string"
                  },
                  "context_management": {
                    "nullable": true,
                    "type": "object",
                    "properties": {}
                  },
                  "mcp_servers": {
                    "type": "array",
                    "items": {}
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "user_id": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "user_id"
                    ]
                  },
                  "output_config": {
                    "type": "object",
                    "properties": {
                      "effort": {
                        "nullable": true,
                        "type": "string"
                      },
                      "format": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "json_schema"
                            ]
                          },
                          "schema": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "required": [
                          "type",
                          "schema"
                        ]
                      }
                    }
                  },
                  "service_tier": {},
                  "speed": {
                    "type": "string",
                    "enum": [
                      "fast",
                      "standard"
                    ]
                  },
                  "stop_sequences": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "system": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "text"
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "cache_control": {
                            "nullable": true
                          },
                          "citations": {
                            "nullable": true,
                            "type": "array",
                            "items": {}
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "text"
                              ]
                            },
                            "text": {
                              "type": "string"
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "citations": {
                              "nullable": true,
                              "type": "array",
                              "items": {}
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ]
                        }
                      }
                    ]
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "thinking": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "budget_tokens": {
                            "type": "number"
                          },
                          "display": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "summarized",
                              "omitted"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "budget_tokens"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "adaptive"
                            ]
                          },
                          "display": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "summarized",
                              "omitted"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "auto"
                            ]
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "any"
                            ]
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "tool"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "disable_parallel_tool_use": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "none"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "type": {
                              "nullable": true,
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "input_schema": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "description": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "input_schema"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "bash"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "bash_20250124"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_editor"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250124"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_based_edit_tool"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250429"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "str_replace_based_edit_tool"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "text_editor_20250728"
                              ]
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "max_characters": {
                              "nullable": true,
                              "type": "number"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "enum": [
                                "web_search"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_search_20250305"
                              ]
                            },
                            "allowed_domains": {
                              "nullable": true,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "blocked_domains": {
                              "nullable": true,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "cache_control": {
                              "nullable": true
                            },
                            "max_uses": {
                              "nullable": true,
                              "type": "number"
                            },
                            "user_location": {
                              "nullable": true
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    }
                  },
                  "top_k": {
                    "type": "number"
                  },
                  "top_p": {
                    "type": "number"
                  },
                  "anthropic_version": {
                    "type": "string"
                  },
                  "anthropic_beta": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "_isStreaming": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "messages",
                  "max_tokens"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "modelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Authorization header with Bearer token"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/v1/cerebras/chat/completions": {
      "post": {
        "operationId": "cerebrasChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Cerebras (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CerebrasChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/cerebras/{agentId}/chat/completions": {
      "post": {
        "operationId": "cerebrasChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Cerebras for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CerebrasChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/chat": {
      "post": {
        "operationId": "streamChat",
        "tags": [
          "Chat"
        ],
        "description": "Stream chat response with MCP tools (useChat format)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "messages": {
                    "type": "array",
                    "items": {}
                  },
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "submit-message",
                      "regenerate-message"
                    ]
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "thinkingEffort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  }
                },
                "required": [
                  "id",
                  "messages"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      }
    },
    "/api/chat/elicitation/{id}": {
      "post": {
        "operationId": "resolveChatMcpElicitation",
        "tags": [
          "Chat"
        ],
        "description": "Resolve a pending MCP elicitation request from chat\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "accept",
                      "decline",
                      "cancel"
                    ]
                  },
                  "content": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "conversationId",
                  "action"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      }
    },
    "/api/chat/tasks/{taskId}/cancel": {
      "post": {
        "operationId": "cancelChatMcpTask",
        "tags": [
          "Chat"
        ],
        "description": "Cancel a long-running MCP task started from chat\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "taskId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cancelled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "cancelled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/stop": {
      "post": {
        "operationId": "stopChatStream",
        "tags": [
          "Chat"
        ],
        "description": "Stop a running chat stream for a conversation\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "stopped": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "stopped"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/active-run": {
      "get": {
        "operationId": "getActiveChatRun",
        "tags": [
          "Chat"
        ],
        "description": "Reconnect to an active chat stream for a conversation\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "204": {
            "description": "Default Response"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      }
    },
    "/api/chat/conversations": {
      "get": {
        "operationId": "getChatConversations",
        "tags": [
          "Chat"
        ],
        "description": "List all conversations for current user with agent details. Optionally filter by search query.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "agentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "chatApiKeyId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "nullable": true,
                        "type": "string"
                      },
                      "selectedModel": {
                        "type": "string"
                      },
                      "selectedProvider": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "openai",
                          "gemini",
                          "anthropic",
                          "bedrock",
                          "cohere",
                          "cerebras",
                          "mistral",
                          "perplexity",
                          "groq",
                          "xai",
                          "openrouter",
                          "vllm",
                          "ollama",
                          "ollama-native",
                          "zhipuai",
                          "deepseek",
                          "minimax",
                          "kimi",
                          "azure",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "archestra"
                        ]
                      },
                      "modelId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "thinkingEffort": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "low",
                          "medium",
                          "high"
                        ]
                      },
                      "hasCustomToolSelection": {
                        "type": "boolean"
                      },
                      "hooksDebugEnabled": {
                        "type": "boolean"
                      },
                      "todoList": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "artifact": {
                        "nullable": true,
                        "type": "string"
                      },
                      "projectId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "origin": {
                        "type": "string",
                        "enum": [
                          "user",
                          "schedule_trigger",
                          "app_open"
                        ]
                      },
                      "titleIsPlaceholder": {
                        "type": "boolean"
                      },
                      "incognito": {
                        "type": "boolean"
                      },
                      "pinnedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "lastMessageAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "contentLocked": {
                        "type": "boolean"
                      },
                      "agent": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "systemPrompt": {
                            "nullable": true,
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "toolExposureMode": {
                            "type": "string",
                            "enum": [
                              "full",
                              "search_and_run_only"
                            ]
                          },
                          "llmApiKeyId": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "systemPrompt",
                          "agentType",
                          "toolExposureMode",
                          "llmApiKeyId"
                        ],
                        "additionalProperties": false
                      },
                      "share": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "organization",
                              "team",
                              "user"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "visibility"
                        ],
                        "additionalProperties": false
                      },
                      "projectName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "projectIcon": {
                        "nullable": true,
                        "type": "string"
                      },
                      "unread": {
                        "type": "boolean"
                      },
                      "messages": {
                        "type": "array",
                        "items": {}
                      },
                      "chatErrors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "conversationId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "error": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "enum": [
                                    "rate_limit",
                                    "usage_limit_exceeded",
                                    "authentication",
                                    "permission_denied",
                                    "invalid_request",
                                    "provider_insufficient_balance",
                                    "not_found",
                                    "context_too_long",
                                    "request_too_large",
                                    "request_exceeds_rate_limit",
                                    "content_filtered",
                                    "server_error",
                                    "network_error",
                                    "empty_response",
                                    "incomplete_tool_call",
                                    "tool_call_output_truncated",
                                    "provider_auth_required",
                                    "tools_unsupported",
                                    "aborted",
                                    "unknown"
                                  ]
                                },
                                "message": {
                                  "type": "string"
                                },
                                "isRetryable": {
                                  "type": "boolean"
                                },
                                "sessionId": {
                                  "type": "string"
                                },
                                "traceId": {
                                  "type": "string"
                                },
                                "spanId": {
                                  "type": "string"
                                },
                                "usageLimitExceeded": {
                                  "type": "boolean"
                                },
                                "usageLimitEntityType": {
                                  "type": "string"
                                },
                                "authAction": {
                                  "type": "object",
                                  "properties": {
                                    "provider": {
                                      "type": "string",
                                      "enum": [
                                        "openai",
                                        "gemini",
                                        "anthropic",
                                        "bedrock",
                                        "cohere",
                                        "cerebras",
                                        "mistral",
                                        "perplexity",
                                        "groq",
                                        "xai",
                                        "openrouter",
                                        "vllm",
                                        "ollama",
                                        "ollama-native",
                                        "zhipuai",
                                        "deepseek",
                                        "minimax",
                                        "kimi",
                                        "azure",
                                        "github-copilot",
                                        "microsoft-365-copilot",
                                        "archestra"
                                      ]
                                    },
                                    "providerLabel": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "provider",
                                    "providerLabel"
                                  ],
                                  "additionalProperties": false
                                },
                                "originalError": {
                                  "type": "object",
                                  "properties": {
                                    "provider": {
                                      "type": "string",
                                      "enum": [
                                        "openai",
                                        "gemini",
                                        "anthropic",
                                        "bedrock",
                                        "cohere",
                                        "cerebras",
                                        "mistral",
                                        "perplexity",
                                        "groq",
                                        "xai",
                                        "openrouter",
                                        "vllm",
                                        "ollama",
                                        "ollama-native",
                                        "zhipuai",
                                        "deepseek",
                                        "minimax",
                                        "kimi",
                                        "azure",
                                        "github-copilot",
                                        "microsoft-365-copilot",
                                        "archestra"
                                      ]
                                    },
                                    "status": {
                                      "type": "number"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "raw": {}
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "isRetryable"
                              ],
                              "additionalProperties": false
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "conversationId",
                            "error",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "compactions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "conversationId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "compactedThroughMessageId": {
                              "nullable": true,
                              "type": "string"
                            },
                            "trigger": {
                              "type": "string",
                              "enum": [
                                "auto",
                                "manual"
                              ]
                            },
                            "provider": {
                              "type": "string"
                            },
                            "model": {
                              "type": "string"
                            },
                            "originalTokenEstimate": {
                              "type": "integer",
                              "minimum": -2147483648,
                              "maximum": 2147483647
                            },
                            "compactedTokenEstimate": {
                              "type": "integer",
                              "minimum": -2147483648,
                              "maximum": 2147483647
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "conversationId",
                            "summary",
                            "compactedThroughMessageId",
                            "trigger",
                            "provider",
                            "model",
                            "originalTokenEstimate",
                            "compactedTokenEstimate",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "id",
                      "userId",
                      "organizationId",
                      "agentId",
                      "chatApiKeyId",
                      "title",
                      "selectedModel",
                      "selectedProvider",
                      "modelId",
                      "thinkingEffort",
                      "hasCustomToolSelection",
                      "hooksDebugEnabled",
                      "todoList",
                      "artifact",
                      "projectId",
                      "origin",
                      "titleIsPlaceholder",
                      "incognito",
                      "pinnedAt",
                      "lastMessageAt",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "agent",
                      "share",
                      "messages",
                      "chatErrors",
                      "compactions"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      },
      "post": {
        "operationId": "createChatConversation",
        "tags": [
          "Chat"
        ],
        "description": "Create a new conversation with an agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:create`: Start new chat conversations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "title": {
                    "nullable": true,
                    "type": "string"
                  },
                  "modelId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "chatApiKeyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "projectId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "incognito": {
                    "type": "boolean"
                  },
                  "thinkingEffort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  }
                },
                "required": [
                  "agentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:create"
          ]
        }
      }
    },
    "/api/chat/conversations/deleted": {
      "get": {
        "operationId": "getDeletedChatConversations",
        "tags": [
          "Chat"
        ],
        "description": "List the current user's soft-deleted conversations (the Trash view), newest deletion first.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:delete`: Delete chat conversations",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "agentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "chatApiKeyId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "nullable": true,
                        "type": "string"
                      },
                      "selectedModel": {
                        "type": "string"
                      },
                      "selectedProvider": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "openai",
                          "gemini",
                          "anthropic",
                          "bedrock",
                          "cohere",
                          "cerebras",
                          "mistral",
                          "perplexity",
                          "groq",
                          "xai",
                          "openrouter",
                          "vllm",
                          "ollama",
                          "ollama-native",
                          "zhipuai",
                          "deepseek",
                          "minimax",
                          "kimi",
                          "azure",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "archestra"
                        ]
                      },
                      "modelId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "thinkingEffort": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "low",
                          "medium",
                          "high"
                        ]
                      },
                      "hasCustomToolSelection": {
                        "type": "boolean"
                      },
                      "hooksDebugEnabled": {
                        "type": "boolean"
                      },
                      "todoList": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "artifact": {
                        "nullable": true,
                        "type": "string"
                      },
                      "projectId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "origin": {
                        "type": "string",
                        "enum": [
                          "user",
                          "schedule_trigger",
                          "app_open"
                        ]
                      },
                      "titleIsPlaceholder": {
                        "type": "boolean"
                      },
                      "incognito": {
                        "type": "boolean"
                      },
                      "pinnedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "lastMessageAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "contentLocked": {
                        "type": "boolean"
                      },
                      "agent": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "systemPrompt": {
                            "nullable": true,
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "toolExposureMode": {
                            "type": "string",
                            "enum": [
                              "full",
                              "search_and_run_only"
                            ]
                          },
                          "llmApiKeyId": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "systemPrompt",
                          "agentType",
                          "toolExposureMode",
                          "llmApiKeyId"
                        ],
                        "additionalProperties": false
                      },
                      "share": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "organization",
                              "team",
                              "user"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "visibility"
                        ],
                        "additionalProperties": false
                      },
                      "projectName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "projectIcon": {
                        "nullable": true,
                        "type": "string"
                      },
                      "unread": {
                        "type": "boolean"
                      },
                      "messages": {
                        "type": "array",
                        "items": {}
                      },
                      "chatErrors": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "conversationId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "error": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "enum": [
                                    "rate_limit",
                                    "usage_limit_exceeded",
                                    "authentication",
                                    "permission_denied",
                                    "invalid_request",
                                    "provider_insufficient_balance",
                                    "not_found",
                                    "context_too_long",
                                    "request_too_large",
                                    "request_exceeds_rate_limit",
                                    "content_filtered",
                                    "server_error",
                                    "network_error",
                                    "empty_response",
                                    "incomplete_tool_call",
                                    "tool_call_output_truncated",
                                    "provider_auth_required",
                                    "tools_unsupported",
                                    "aborted",
                                    "unknown"
                                  ]
                                },
                                "message": {
                                  "type": "string"
                                },
                                "isRetryable": {
                                  "type": "boolean"
                                },
                                "sessionId": {
                                  "type": "string"
                                },
                                "traceId": {
                                  "type": "string"
                                },
                                "spanId": {
                                  "type": "string"
                                },
                                "usageLimitExceeded": {
                                  "type": "boolean"
                                },
                                "usageLimitEntityType": {
                                  "type": "string"
                                },
                                "authAction": {
                                  "type": "object",
                                  "properties": {
                                    "provider": {
                                      "type": "string",
                                      "enum": [
                                        "openai",
                                        "gemini",
                                        "anthropic",
                                        "bedrock",
                                        "cohere",
                                        "cerebras",
                                        "mistral",
                                        "perplexity",
                                        "groq",
                                        "xai",
                                        "openrouter",
                                        "vllm",
                                        "ollama",
                                        "ollama-native",
                                        "zhipuai",
                                        "deepseek",
                                        "minimax",
                                        "kimi",
                                        "azure",
                                        "github-copilot",
                                        "microsoft-365-copilot",
                                        "archestra"
                                      ]
                                    },
                                    "providerLabel": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "provider",
                                    "providerLabel"
                                  ],
                                  "additionalProperties": false
                                },
                                "originalError": {
                                  "type": "object",
                                  "properties": {
                                    "provider": {
                                      "type": "string",
                                      "enum": [
                                        "openai",
                                        "gemini",
                                        "anthropic",
                                        "bedrock",
                                        "cohere",
                                        "cerebras",
                                        "mistral",
                                        "perplexity",
                                        "groq",
                                        "xai",
                                        "openrouter",
                                        "vllm",
                                        "ollama",
                                        "ollama-native",
                                        "zhipuai",
                                        "deepseek",
                                        "minimax",
                                        "kimi",
                                        "azure",
                                        "github-copilot",
                                        "microsoft-365-copilot",
                                        "archestra"
                                      ]
                                    },
                                    "status": {
                                      "type": "number"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "raw": {}
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "isRetryable"
                              ],
                              "additionalProperties": false
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "conversationId",
                            "error",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "compactions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "conversationId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "compactedThroughMessageId": {
                              "nullable": true,
                              "type": "string"
                            },
                            "trigger": {
                              "type": "string",
                              "enum": [
                                "auto",
                                "manual"
                              ]
                            },
                            "provider": {
                              "type": "string"
                            },
                            "model": {
                              "type": "string"
                            },
                            "originalTokenEstimate": {
                              "type": "integer",
                              "minimum": -2147483648,
                              "maximum": 2147483647
                            },
                            "compactedTokenEstimate": {
                              "type": "integer",
                              "minimum": -2147483648,
                              "maximum": 2147483647
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "conversationId",
                            "summary",
                            "compactedThroughMessageId",
                            "trigger",
                            "provider",
                            "model",
                            "originalTokenEstimate",
                            "compactedTokenEstimate",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "id",
                      "userId",
                      "organizationId",
                      "agentId",
                      "chatApiKeyId",
                      "title",
                      "selectedModel",
                      "selectedProvider",
                      "modelId",
                      "thinkingEffort",
                      "hasCustomToolSelection",
                      "hooksDebugEnabled",
                      "todoList",
                      "artifact",
                      "projectId",
                      "origin",
                      "titleIsPlaceholder",
                      "incognito",
                      "pinnedAt",
                      "lastMessageAt",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "agent",
                      "share",
                      "messages",
                      "chatErrors",
                      "compactions"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:delete"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}": {
      "get": {
        "operationId": "getChatConversation",
        "tags": [
          "Chat"
        ],
        "description": "Get conversation with messages\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      },
      "patch": {
        "operationId": "updateChatConversation",
        "tags": [
          "Chat"
        ],
        "description": "Update conversation title, model, agent, or API key\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "nullable": true,
                    "type": "string"
                  },
                  "modelId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "chatApiKeyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "agentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "artifact": {
                    "nullable": true,
                    "type": "string"
                  },
                  "pinnedAt": {
                    "nullable": true,
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  "thinkingEffort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteChatConversation",
        "tags": [
          "Chat"
        ],
        "description": "Delete a conversation\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:delete`: Delete chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:delete"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/hooks-debug": {
      "post": {
        "operationId": "setConversationHooksDebug",
        "tags": [
          "Chat"
        ],
        "description": "Toggle per-conversation hook debug mode (admin only). When on, hook runs surface inline as expandable debug chips for admins.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "hooksDebugEnabled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/read": {
      "post": {
        "operationId": "markChatConversationRead",
        "tags": [
          "Chat"
        ],
        "description": "Mark a conversation read by its owner, clearing the sidebar new-messages indicator.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/files": {
      "get": {
        "operationId": "getChatConversationFiles",
        "tags": [
          "Chat"
        ],
        "description": "List files for a conversation: this chat's own outputs, user attachments, and — for a project chat — every file in the project (metadata only).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "generated": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "mimeType": {
                            "type": "string"
                          },
                          "contentUrl": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "mimeType",
                          "contentUrl",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "mimeType": {
                            "type": "string"
                          },
                          "contentUrl": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "mimeType",
                          "contentUrl",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "projectFiles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "mimeType": {
                            "type": "string"
                          },
                          "contentUrl": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "mimeType",
                          "contentUrl",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "canManageFiles": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "generated",
                    "attachments",
                    "projectFiles",
                    "projectName",
                    "canManageFiles"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      }
    },
    "/api/chat/attachments/{id}/content": {
      "get": {
        "operationId": "getChatAttachmentContent",
        "tags": [
          "Chat"
        ],
        "description": "Stream the bytes of a chat attachment by id. Auth'd to the org.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      }
    },
    "/api/chat/attachments/{id}": {
      "delete": {
        "operationId": "deleteChatAttachment",
        "tags": [
          "Chat"
        ],
        "description": "Soft-delete a chat attachment by id. Owner-gated: only the conversation owner may remove its attachments.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/fork": {
      "post": {
        "operationId": "forkChatConversation",
        "tags": [
          "Chat"
        ],
        "description": "Create a new conversation from an accessible conversation\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:create`: Start new chat conversations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "agentId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:create"
          ]
        }
      }
    },
    "/api/chat/agents/{agentId}/mcp-tools": {
      "get": {
        "operationId": "getChatAgentMcpTools",
        "tags": [
          "Chat"
        ],
        "description": "Get MCP tools available for an agent via MCP Gateway\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agent:read`: View and list agents",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "parameters": {
                        "nullable": true,
                        "type": "object",
                        "additionalProperties": {}
                      }
                    },
                    "required": [
                      "name",
                      "description",
                      "parameters"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agent:read"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/restore": {
      "post": {
        "operationId": "restoreChatConversation",
        "tags": [
          "Chat"
        ],
        "description": "Restore a soft-deleted conversation\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:delete`: Delete chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:delete"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/chat-errors": {
      "delete": {
        "operationId": "clearChatConversationErrors",
        "tags": [
          "Chat"
        ],
        "description": "Clear a conversation's recorded chat errors\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/compact": {
      "post": {
        "operationId": "compactChatConversation",
        "tags": [
          "Chat"
        ],
        "description": "Compact older chat history for model context\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "created",
                        "existing",
                        "skipped",
                        "failed"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "compaction": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "conversationId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "summary": {
                          "type": "string"
                        },
                        "compactedThroughMessageId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "trigger": {
                          "type": "string",
                          "enum": [
                            "auto",
                            "manual"
                          ]
                        },
                        "provider": {
                          "type": "string"
                        },
                        "model": {
                          "type": "string"
                        },
                        "originalTokenEstimate": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "compactedTokenEstimate": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "summary",
                        "compactedThroughMessageId",
                        "trigger",
                        "provider",
                        "model",
                        "originalTokenEstimate",
                        "compactedTokenEstimate",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "userId": {
                          "type": "string"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "agentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "chatApiKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "title": {
                          "nullable": true,
                          "type": "string"
                        },
                        "selectedModel": {
                          "type": "string"
                        },
                        "selectedProvider": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "openai",
                            "gemini",
                            "anthropic",
                            "bedrock",
                            "cohere",
                            "cerebras",
                            "mistral",
                            "perplexity",
                            "groq",
                            "xai",
                            "openrouter",
                            "vllm",
                            "ollama",
                            "ollama-native",
                            "zhipuai",
                            "deepseek",
                            "minimax",
                            "kimi",
                            "azure",
                            "github-copilot",
                            "microsoft-365-copilot",
                            "archestra"
                          ]
                        },
                        "modelId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "thinkingEffort": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "hasCustomToolSelection": {
                          "type": "boolean"
                        },
                        "hooksDebugEnabled": {
                          "type": "boolean"
                        },
                        "todoList": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "string",
                                  "nullable": true,
                                  "enum": [
                                    null
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            }
                          ]
                        },
                        "artifact": {
                          "nullable": true,
                          "type": "string"
                        },
                        "projectId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "user",
                            "schedule_trigger",
                            "app_open"
                          ]
                        },
                        "titleIsPlaceholder": {
                          "type": "boolean"
                        },
                        "incognito": {
                          "type": "boolean"
                        },
                        "pinnedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "deletedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "contentLocked": {
                          "type": "boolean"
                        },
                        "agent": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "systemPrompt": {
                              "nullable": true,
                              "type": "string"
                            },
                            "agentType": {
                              "type": "string",
                              "enum": [
                                "profile",
                                "mcp_gateway",
                                "llm_proxy",
                                "agent"
                              ]
                            },
                            "toolExposureMode": {
                              "type": "string",
                              "enum": [
                                "full",
                                "search_and_run_only"
                              ]
                            },
                            "llmApiKeyId": {
                              "nullable": true,
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "systemPrompt",
                            "agentType",
                            "toolExposureMode",
                            "llmApiKeyId"
                          ],
                          "additionalProperties": false
                        },
                        "share": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "visibility": {
                              "type": "string",
                              "enum": [
                                "organization",
                                "team",
                                "user"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "visibility"
                          ],
                          "additionalProperties": false
                        },
                        "projectName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "projectIcon": {
                          "nullable": true,
                          "type": "string"
                        },
                        "unread": {
                          "type": "boolean"
                        },
                        "messages": {
                          "type": "array",
                          "items": {}
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "compactions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "summary": {
                                "type": "string"
                              },
                              "compactedThroughMessageId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "trigger": {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "manual"
                                ]
                              },
                              "provider": {
                                "type": "string"
                              },
                              "model": {
                                "type": "string"
                              },
                              "originalTokenEstimate": {
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "compactedTokenEstimate": {
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "summary",
                              "compactedThroughMessageId",
                              "trigger",
                              "provider",
                              "model",
                              "originalTokenEstimate",
                              "compactedTokenEstimate",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "userId",
                        "organizationId",
                        "agentId",
                        "chatApiKeyId",
                        "title",
                        "selectedModel",
                        "selectedProvider",
                        "modelId",
                        "thinkingEffort",
                        "hasCustomToolSelection",
                        "hooksDebugEnabled",
                        "todoList",
                        "artifact",
                        "projectId",
                        "origin",
                        "titleIsPlaceholder",
                        "incognito",
                        "pinnedAt",
                        "lastMessageAt",
                        "createdAt",
                        "updatedAt",
                        "deletedAt",
                        "agent",
                        "share",
                        "messages",
                        "chatErrors",
                        "compactions"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "compaction",
                    "conversation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/share": {
      "get": {
        "operationId": "getConversationShare",
        "tags": [
          "Chat"
        ],
        "description": "Get share status for a conversation\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "conversationId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdByUserId": {
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "user"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "conversationId",
                    "organizationId",
                    "createdByUserId",
                    "visibility",
                    "createdAt",
                    "teamIds",
                    "userIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      },
      "post": {
        "operationId": "shareConversation",
        "tags": [
          "Chat"
        ],
        "description": "Share a conversation with your organization, specific teams, or specific users\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "team",
                      "user"
                    ]
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "userIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "visibility"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "conversationId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdByUserId": {
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "user"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "conversationId",
                    "organizationId",
                    "createdByUserId",
                    "visibility",
                    "createdAt",
                    "teamIds",
                    "userIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      },
      "delete": {
        "operationId": "unshareConversation",
        "tags": [
          "Chat"
        ],
        "description": "Revoke sharing of a conversation\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/shared/{shareId}": {
      "get": {
        "operationId": "getSharedConversation",
        "tags": [
          "Chat"
        ],
        "description": "Get a shared conversation by share ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "shareId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "sharedByUserId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions",
                    "sharedByUserId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      }
    },
    "/api/chat/shared/{shareId}/fork": {
      "post": {
        "operationId": "forkSharedConversation",
        "tags": [
          "Chat"
        ],
        "description": "Create a new conversation from a shared conversation's messages\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:create`: Start new chat conversations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "agentId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "shareId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:create"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/generate-title": {
      "post": {
        "operationId": "generateChatConversationTitle",
        "tags": [
          "Chat"
        ],
        "description": "Generate a title for the conversation based on the first user message and assistant response\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regenerate": {
                    "description": "Force regeneration even if title already exists (for manual regeneration)",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/messages/{id}": {
      "patch": {
        "operationId": "updateChatMessage",
        "tags": [
          "Chat"
        ],
        "description": "Update a specific text part in a message\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string"
                  },
                  "partIndex": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1
                  },
                  "deleteSubsequentMessages": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "conversationId",
                  "partIndex",
                  "text"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/messages/{id}/feedback": {
      "patch": {
        "operationId": "setChatMessageFeedback",
        "tags": [
          "Chat"
        ],
        "description": "Set or clear the owner's thumbs feedback on an assistant message\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "feedback": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "up",
                          "down"
                        ]
                      },
                      {
                        "type": "string",
                        "nullable": true,
                        "enum": [
                          null
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "conversationId",
                  "feedback"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "feedback": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "up",
                            "down"
                          ]
                        },
                        {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            null
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "feedback"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/chat/conversations/{id}/enabled-tools": {
      "get": {
        "operationId": "getConversationEnabledTools",
        "tags": [
          "Chat"
        ],
        "description": "Get enabled tools for a conversation. Empty array means all profile tools are enabled (default).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:read`: View and access chat conversations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hasCustomSelection": {
                      "type": "boolean"
                    },
                    "enabledToolIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "hasCustomSelection",
                    "enabledToolIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:read"
          ]
        }
      },
      "put": {
        "operationId": "updateConversationEnabledTools",
        "tags": [
          "Chat"
        ],
        "description": "Set enabled tools for a conversation. Replaces all existing selections.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "toolIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "toolIds"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hasCustomSelection": {
                      "type": "boolean"
                    },
                    "enabledToolIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "hasCustomSelection",
                    "enabledToolIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteConversationEnabledTools",
        "tags": [
          "Chat"
        ],
        "description": "Clear custom tool selection for a conversation (revert to all tools enabled)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`chat:update`: Edit chat messages and conversation settings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "chat:update"
          ]
        }
      }
    },
    "/api/webhooks/chatops/ms-teams": {
      "post": {
        "tags": [
          "ChatOps Webhooks"
        ],
        "description": "MS Teams Bot Framework webhook endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "success"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/webhooks/chatops/slack": {
      "post": {
        "tags": [
          "ChatOps Webhooks"
        ],
        "description": "Slack Events API webhook endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "challenge": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "challenge"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "ok"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/webhooks/chatops/slack/interactive": {
      "post": {
        "tags": [
          "ChatOps Webhooks"
        ],
        "description": "Slack interactive components endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/webhooks/chatops/slack/slash-command": {
      "post": {
        "tags": [
          "ChatOps Webhooks"
        ],
        "description": "Slack slash commands endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/chatops/status": {
      "get": {
        "operationId": "getChatOpsStatus",
        "tags": [
          "ChatOps"
        ],
        "description": "Get chatops provider configuration status\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:read`: View agent trigger configurations (Slack, MS Teams, email)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "ms-teams",
                              "slack",
                              "telegram"
                            ]
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "configured": {
                            "type": "boolean"
                          },
                          "credentials": {
                            "type": "object",
                            "properties": {
                              "botToken": {
                                "type": "string"
                              },
                              "appId": {
                                "type": "string"
                              },
                              "appSecret": {
                                "type": "string"
                              },
                              "tenantId": {
                                "type": "string"
                              },
                              "signingSecret": {
                                "type": "string"
                              },
                              "appLevelToken": {
                                "type": "string"
                              },
                              "connectionMode": {
                                "type": "string",
                                "enum": [
                                  "webhook",
                                  "socket"
                                ]
                              }
                            },
                            "additionalProperties": false
                          },
                          "dmInfo": {
                            "type": "object",
                            "properties": {
                              "botUserId": {
                                "type": "string"
                              },
                              "teamId": {
                                "type": "string"
                              },
                              "appId": {
                                "type": "string"
                              },
                              "botUsername": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "displayName",
                          "configured"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "providers"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:read"
          ]
        }
      }
    },
    "/api/chatops/bindings": {
      "get": {
        "operationId": "listChatOpsBindings",
        "tags": [
          "ChatOps"
        ],
        "description": "List chatops channel bindings with pagination\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:read`: View agent trigger configurations (Slack, MS Teams, email)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "ms-teams",
                "slack",
                "telegram"
              ]
            },
            "in": "query",
            "name": "provider",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "workspaceId",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "configured",
                "unassigned"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "channelName",
                "createdAt"
              ]
            },
            "in": "query",
            "name": "sortBy",
            "required": false
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string",
                            "enum": [
                              "ms-teams",
                              "slack",
                              "telegram"
                            ]
                          },
                          "channelId": {
                            "type": "string",
                            "maxLength": 256
                          },
                          "workspaceId": {
                            "nullable": true,
                            "type": "string",
                            "maxLength": 256
                          },
                          "channelName": {
                            "nullable": true,
                            "type": "string",
                            "maxLength": 256
                          },
                          "workspaceName": {
                            "nullable": true,
                            "type": "string",
                            "maxLength": 256
                          },
                          "isDm": {
                            "type": "boolean"
                          },
                          "answerAllMessages": {
                            "type": "boolean"
                          },
                          "dmOwnerEmail": {
                            "nullable": true,
                            "type": "string",
                            "maxLength": 256
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "provider",
                          "channelId",
                          "workspaceId",
                          "channelName",
                          "workspaceName",
                          "isDm",
                          "answerAllMessages",
                          "dmOwnerEmail",
                          "agentId",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "configured": {
                          "type": "number"
                        },
                        "unassigned": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "configured",
                        "unassigned"
                      ],
                      "additionalProperties": false
                    },
                    "workspaces": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "hasDmBinding": {
                      "type": "boolean"
                    },
                    "workspacesWithUnmentionedTraffic": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "data",
                    "pagination",
                    "counts",
                    "workspaces",
                    "hasDmBinding",
                    "workspacesWithUnmentionedTraffic"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:read"
          ]
        }
      },
      "patch": {
        "operationId": "bulkUpdateChatOpsBindings",
        "tags": [
          "ChatOps"
        ],
        "description": "Bulk-update agent assignment for multiple channel bindings\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:update`: Modify agent trigger configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "agentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "ids",
                  "agentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "string",
                        "enum": [
                          "ms-teams",
                          "slack",
                          "telegram"
                        ]
                      },
                      "channelId": {
                        "type": "string",
                        "maxLength": 256
                      },
                      "workspaceId": {
                        "nullable": true,
                        "type": "string",
                        "maxLength": 256
                      },
                      "channelName": {
                        "nullable": true,
                        "type": "string",
                        "maxLength": 256
                      },
                      "workspaceName": {
                        "nullable": true,
                        "type": "string",
                        "maxLength": 256
                      },
                      "isDm": {
                        "type": "boolean"
                      },
                      "answerAllMessages": {
                        "type": "boolean"
                      },
                      "dmOwnerEmail": {
                        "nullable": true,
                        "type": "string",
                        "maxLength": 256
                      },
                      "agentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "provider",
                      "channelId",
                      "workspaceId",
                      "channelName",
                      "workspaceName",
                      "isDm",
                      "answerAllMessages",
                      "dmOwnerEmail",
                      "agentId",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:update"
          ]
        }
      }
    },
    "/api/chatops/bindings/{id}": {
      "delete": {
        "operationId": "deleteChatOpsBinding",
        "tags": [
          "ChatOps"
        ],
        "description": "Delete a chatops channel binding\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:delete`: Remove agent triggers",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:delete"
          ]
        }
      },
      "patch": {
        "operationId": "updateChatOpsBinding",
        "tags": [
          "ChatOps"
        ],
        "description": "Update a chatops channel binding\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:update`: Modify agent trigger configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "answerAllMessages": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "ms-teams",
                        "slack",
                        "telegram"
                      ]
                    },
                    "channelId": {
                      "type": "string",
                      "maxLength": 256
                    },
                    "workspaceId": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 256
                    },
                    "channelName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 256
                    },
                    "workspaceName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 256
                    },
                    "isDm": {
                      "type": "boolean"
                    },
                    "answerAllMessages": {
                      "type": "boolean"
                    },
                    "dmOwnerEmail": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 256
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "provider",
                    "channelId",
                    "workspaceId",
                    "channelName",
                    "workspaceName",
                    "isDm",
                    "answerAllMessages",
                    "dmOwnerEmail",
                    "agentId",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:update"
          ]
        }
      }
    },
    "/api/chatops/bindings/dm": {
      "post": {
        "operationId": "createChatOpsDmBinding",
        "tags": [
          "ChatOps"
        ],
        "description": "Create a pending DM binding so an agent can be pre-assigned before the first DM interaction\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:create`: Set up new agent triggers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "ms-teams",
                      "slack",
                      "telegram"
                    ]
                  },
                  "agentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "provider",
                  "agentId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "ms-teams",
                        "slack",
                        "telegram"
                      ]
                    },
                    "channelId": {
                      "type": "string",
                      "maxLength": 256
                    },
                    "workspaceId": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 256
                    },
                    "channelName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 256
                    },
                    "workspaceName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 256
                    },
                    "isDm": {
                      "type": "boolean"
                    },
                    "answerAllMessages": {
                      "type": "boolean"
                    },
                    "dmOwnerEmail": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 256
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "provider",
                    "channelId",
                    "workspaceId",
                    "channelName",
                    "workspaceName",
                    "isDm",
                    "answerAllMessages",
                    "dmOwnerEmail",
                    "agentId",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:create"
          ]
        }
      }
    },
    "/api/chatops/config/ms-teams": {
      "put": {
        "operationId": "updateChatOpsConfigInQuickstart",
        "tags": [
          "ChatOps"
        ],
        "description": "Update MS Teams chatops configuration\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:update`: Modify agent trigger configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "appId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "appSecret": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "tenantId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:update"
          ]
        }
      }
    },
    "/api/chatops/config/ngrok": {
      "put": {
        "operationId": "connectNgrok",
        "tags": [
          "ChatOps"
        ],
        "description": "Connect an ngrok tunnel for inbound chatops webhooks\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:update`: Modify agent trigger configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "authToken": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "domain": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "domain": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "domain"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:update"
          ]
        }
      },
      "delete": {
        "operationId": "disconnectNgrok",
        "tags": [
          "ChatOps"
        ],
        "description": "Stop the ngrok tunnel and clear its credentials\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:update`: Modify agent trigger configurations",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:update"
          ]
        }
      },
      "get": {
        "operationId": "getNgrokConfig",
        "tags": [
          "ChatOps"
        ],
        "description": "Get saved ngrok configuration (token redacted)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:read`: View agent trigger configurations (Slack, MS Teams, email)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hasAuthToken": {
                      "type": "boolean"
                    },
                    "domain": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "hasAuthToken",
                    "domain"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:read"
          ]
        }
      }
    },
    "/api/chatops/config/slack": {
      "put": {
        "operationId": "updateSlackChatOpsConfig",
        "tags": [
          "ChatOps"
        ],
        "description": "Update Slack chatops configuration\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:update`: Modify agent trigger configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "botToken": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "signingSecret": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "appId": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "connectionMode": {
                    "type": "string",
                    "enum": [
                      "webhook",
                      "socket"
                    ]
                  },
                  "appLevelToken": {
                    "type": "string",
                    "maxLength": 512
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:update"
          ]
        }
      }
    },
    "/api/chatops/config/telegram": {
      "put": {
        "operationId": "updateTelegramChatOpsConfig",
        "tags": [
          "ChatOps"
        ],
        "description": "Update Telegram chatops configuration\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:update`: Modify agent trigger configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "botToken": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:update"
          ]
        }
      }
    },
    "/api/chatops/telegram/link-code": {
      "post": {
        "operationId": "generateTelegramLinkCode",
        "tags": [
          "ChatOps"
        ],
        "description": "Generate a one-shot code that links the current user's Telegram account via a t.me deep link\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "botUsername": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "botUsername"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/chatops/telegram/link": {
      "post": {
        "operationId": "linkTelegramChatOpsAccount",
        "tags": [
          "ChatOps"
        ],
        "description": "Link the current user's Telegram account using a code from the bot\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/chatops/channel-discovery/refresh": {
      "post": {
        "operationId": "refreshChatOpsChannelDiscovery",
        "tags": [
          "ChatOps"
        ],
        "description": "Refresh channel discovery cache for a chatops provider\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:read`: View agent trigger configurations (Slack, MS Teams, email)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "ms-teams",
                      "slack",
                      "telegram"
                    ]
                  }
                },
                "required": [
                  "provider"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:read"
          ]
        }
      }
    },
    "/v1/cohere/chat": {
      "post": {
        "operationId": "cohereChatWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Send a chat request to Cohere using the default agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CohereChatRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for API auth"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CohereChatResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/cohere/{agentId}/chat": {
      "post": {
        "operationId": "cohereChatWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Send a chat request to Cohere using a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CohereChatRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for API auth"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CohereChatResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/config/public": {
      "get": {
        "operationId": "getPublicConfig",
        "tags": [
          "Config"
        ],
        "description": "Get public config\n\nAuthentication:\n\nNot required.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "disableBasicAuth": {
                      "type": "boolean"
                    },
                    "disableInvitations": {
                      "type": "boolean"
                    },
                    "disableImpersonation": {
                      "type": "boolean"
                    },
                    "devAutoLoginEnabled": {
                      "type": "boolean"
                    },
                    "maintenanceMode": {
                      "nullable": true,
                      "type": "string"
                    },
                    "siteNotificationMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "enterpriseCoreActive": {
                      "type": "boolean"
                    },
                    "mcpSandboxDomain": {
                      "nullable": true,
                      "type": "string"
                    },
                    "analytics": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "instanceId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "posthog": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string"
                            },
                            "host": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "key",
                            "host"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "enabled",
                        "instanceId",
                        "posthog"
                      ],
                      "additionalProperties": false
                    },
                    "rum": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "sampleRate": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "enabled",
                        "sampleRate"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "disableBasicAuth",
                    "disableInvitations",
                    "disableImpersonation",
                    "devAutoLoginEnabled",
                    "maintenanceMode",
                    "siteNotificationMessage",
                    "enterpriseCoreActive",
                    "mcpSandboxDomain",
                    "analytics",
                    "rum"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/config": {
      "get": {
        "operationId": "getConfig",
        "tags": [
          "Config"
        ],
        "description": "Get platform configuration and feature flags\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enterpriseFeatures": {
                      "type": "object",
                      "properties": {
                        "core": {
                          "type": "boolean"
                        },
                        "knowledgeBase": {
                          "type": "boolean"
                        },
                        "fullWhiteLabeling": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "core",
                        "knowledgeBase",
                        "fullWhiteLabeling"
                      ],
                      "additionalProperties": false
                    },
                    "smallTeamTier": {
                      "type": "object",
                      "properties": {
                        "threshold": {
                          "type": "number"
                        },
                        "userCount": {
                          "type": "number"
                        },
                        "smallTeam": {
                          "type": "boolean"
                        },
                        "envFlag": {
                          "type": "boolean"
                        },
                        "communicate": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "threshold",
                        "userCount",
                        "smallTeam",
                        "envFlag",
                        "communicate"
                      ],
                      "additionalProperties": false
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "betaEnabled": {
                          "type": "boolean"
                        },
                        "orchestratorK8sRuntime": {
                          "type": "boolean"
                        },
                        "sandbox": {
                          "type": "boolean"
                        },
                        "sandboxArtifactBytesLimit": {
                          "type": "number"
                        },
                        "chatAttachmentStorageBytesLimit": {
                          "type": "number"
                        },
                        "apiBodyLimitBytes": {
                          "type": "number"
                        },
                        "byosEnabled": {
                          "type": "boolean"
                        },
                        "byosVaultKvVersion": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "1",
                            "2"
                          ]
                        },
                        "azureOpenAiEntraIdEnabled": {
                          "type": "boolean"
                        },
                        "anthropicWifEnabled": {
                          "type": "boolean"
                        },
                        "bedrockIamAuthEnabled": {
                          "type": "boolean"
                        },
                        "geminiVertexAiEnabled": {
                          "type": "boolean"
                        },
                        "incomingEmail": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "outlook"
                              ]
                            },
                            "displayName": {
                              "type": "string"
                            },
                            "emailDomain": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "enabled"
                          ],
                          "additionalProperties": false
                        },
                        "mcpServerBaseImage": {
                          "type": "string"
                        },
                        "orchestratorK8sNamespace": {
                          "type": "string"
                        },
                        "environmentNamespaces": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "isQuickstart": {
                          "type": "boolean"
                        },
                        "ngrokDomain": {
                          "type": "string"
                        },
                        "virtualKeyDefaultExpirationSeconds": {
                          "type": "number"
                        },
                        "mcpSandboxDomain": {
                          "nullable": true,
                          "type": "string"
                        },
                        "maintenanceMode": {
                          "nullable": true,
                          "type": "string"
                        },
                        "chatSecretScanEnabled": {
                          "type": "boolean"
                        },
                        "chatIncognitoEnabled": {
                          "type": "boolean"
                        },
                        "agentHooksEnabled": {
                          "type": "boolean"
                        },
                        "chatopsTelegramEnabled": {
                          "type": "boolean"
                        },
                        "kbAutoSyncPermissionsEnabled": {
                          "type": "boolean"
                        },
                        "kbMfilesConnectorEnabled": {
                          "type": "boolean"
                        },
                        "kbMfilesOauthEnabled": {
                          "type": "boolean"
                        },
                        "kbGoogleDriveOAuth": {
                          "type": "object",
                          "properties": {
                            "configured": {
                              "type": "boolean"
                            },
                            "redirectUri": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "configured",
                            "redirectUri"
                          ],
                          "additionalProperties": false
                        },
                        "mcpGatewaySkillsEnabled": {
                          "type": "boolean"
                        },
                        "hackathonRecorderEnabled": {
                          "type": "boolean"
                        },
                        "hackathonVideoDownloadEnabled": {
                          "type": "boolean"
                        },
                        "hackathonMaxFinalCutMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "maximum": 9007199254740991
                        },
                        "hackathonGalleryRepo": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "owner": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "owner",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "betaEnabled",
                        "orchestratorK8sRuntime",
                        "sandbox",
                        "sandboxArtifactBytesLimit",
                        "chatAttachmentStorageBytesLimit",
                        "apiBodyLimitBytes",
                        "byosEnabled",
                        "byosVaultKvVersion",
                        "azureOpenAiEntraIdEnabled",
                        "anthropicWifEnabled",
                        "bedrockIamAuthEnabled",
                        "geminiVertexAiEnabled",
                        "incomingEmail",
                        "mcpServerBaseImage",
                        "orchestratorK8sNamespace",
                        "environmentNamespaces",
                        "isQuickstart",
                        "ngrokDomain",
                        "virtualKeyDefaultExpirationSeconds",
                        "mcpSandboxDomain",
                        "maintenanceMode",
                        "chatSecretScanEnabled",
                        "chatIncognitoEnabled",
                        "agentHooksEnabled",
                        "chatopsTelegramEnabled",
                        "kbAutoSyncPermissionsEnabled",
                        "kbMfilesConnectorEnabled",
                        "kbMfilesOauthEnabled",
                        "kbGoogleDriveOAuth",
                        "mcpGatewaySkillsEnabled",
                        "hackathonRecorderEnabled",
                        "hackathonVideoDownloadEnabled",
                        "hackathonMaxFinalCutMs",
                        "hackathonGalleryRepo"
                      ],
                      "additionalProperties": false
                    },
                    "providerBaseUrls": {
                      "type": "object",
                      "additionalProperties": {
                        "nullable": true,
                        "type": "string"
                      },
                      "required": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    }
                  },
                  "required": [
                    "enterpriseFeatures",
                    "smallTeamTier",
                    "features",
                    "providerBaseUrls"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "getConnectionHealth",
        "tags": [
          "Connection Setups"
        ],
        "description": "Health of the remotes a connected client is wired to, one request for all of them. Public: used by the Claude Code startup guard before every launch, from machines with no session. Reports only ok/down per requested remote.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "in": "query",
            "name": "mcp",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "in": "query",
            "name": "llm",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mcp": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "down"
                      ]
                    },
                    "llm": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "down"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/connection-setups": {
      "post": {
        "operationId": "createConnectionSetup",
        "tags": [
          "Connection Setups"
        ],
        "description": "Persist /connection wizard selections and return a one-time `curl | bash` command. The command's setup token is shown exactly once and expires after 15 minutes.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientId": {
                    "type": "string",
                    "enum": [
                      "claude-code",
                      "codex",
                      "copilot-cli",
                      "cursor"
                    ]
                  },
                  "platform": {
                    "default": "macos",
                    "type": "string",
                    "enum": [
                      "macos",
                      "linux",
                      "windows"
                    ]
                  },
                  "baseUrl": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "mcpGatewayId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "llmProxyId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "gemini",
                      "anthropic",
                      "bedrock",
                      "cohere",
                      "cerebras",
                      "mistral",
                      "perplexity",
                      "groq",
                      "xai",
                      "openrouter",
                      "vllm",
                      "ollama",
                      "ollama-native",
                      "zhipuai",
                      "deepseek",
                      "minimax",
                      "kimi",
                      "azure",
                      "github-copilot",
                      "microsoft-365-copilot",
                      "archestra"
                    ]
                  },
                  "proxyAuth": {
                    "default": "provider-key",
                    "type": "string",
                    "enum": [
                      "provider-key",
                      "virtual-key"
                    ]
                  },
                  "attributePassthrough": {
                    "default": true,
                    "type": "boolean"
                  },
                  "model": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[\\x20-\\x7E]+$"
                  },
                  "skills": {
                    "type": "object",
                    "properties": {
                      "skillIds": {
                        "minItems": 1,
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "ttlDays": {
                        "nullable": true,
                        "type": "integer",
                        "exclusiveMinimum": true,
                        "maximum": 3650
                      }
                    },
                    "required": [
                      "skillIds",
                      "ttlDays"
                    ]
                  }
                },
                "required": [
                  "clientId",
                  "baseUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "command": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tokenStart": {
                      "type": "string"
                    },
                    "creditWarning": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "insufficient_balance",
                            "unverified"
                          ]
                        },
                        "keyName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "keyName"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "command",
                    "expiresAt",
                    "tokenStart"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/connection-setups/virtual-key": {
      "post": {
        "operationId": "createConnectionVirtualKey",
        "tags": [
          "Connection Setups"
        ],
        "description": "Provision (or reuse) the caller's personal connection virtual key for a provider and return its value once. Backs the manual /connection flow's virtual-key option; mirrors the auto-provisioning done by the one-command setup. Requires llmVirtualKey:create.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "gemini",
                      "anthropic",
                      "bedrock",
                      "cohere",
                      "cerebras",
                      "mistral",
                      "perplexity",
                      "groq",
                      "xai",
                      "openrouter",
                      "vllm",
                      "ollama",
                      "ollama-native",
                      "zhipuai",
                      "deepseek",
                      "minimax",
                      "kimi",
                      "azure",
                      "github-copilot",
                      "microsoft-365-copilot",
                      "archestra"
                    ]
                  }
                },
                "required": [
                  "provider"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "creditWarning": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "insufficient_balance",
                            "unverified"
                          ]
                        },
                        "keyName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "keyName"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "value",
                    "name"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/connection-setups/passthrough-key": {
      "post": {
        "operationId": "createConnectionPassthroughKey",
        "tags": [
          "Connection Setups"
        ],
        "description": "Provision (or reuse) the caller's personal passthrough virtual key scoped to an LLM proxy and return its value once. Backs the manual /connection flow's X-Archestra-Virtual-Key attribution step for Claude Code and Claude Desktop. Requires llmVirtualKey:create.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "llmProxyId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "llmProxyId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "value",
                    "name"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/connection-setups/script/{token}": {
      "get": {
        "operationId": "getConnectionSetupScript",
        "tags": [
          "Connection Setups"
        ],
        "description": "Serve the rendered one-time setup script for a connection setup. Authenticates via the one-time token in the path; the token is consumed atomically on the first successful render.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 256
            },
            "in": "path",
            "name": "token",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/v1/deepseek/chat/completions": {
      "post": {
        "operationId": "deepseekChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with DeepSeek (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeepSeekChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepSeekChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/deepseek/{agentId}/chat/completions": {
      "post": {
        "operationId": "deepseekChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with DeepSeek for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeepSeekChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepSeekChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/default-user-limits": {
      "get": {
        "operationId": "listDefaultUserLimits",
        "tags": [
          "Limits"
        ],
        "description": "List per-environment default user limits for the org.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:read`: View token usage limits",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "environmentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "limitValue": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "model": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "cleanupInterval": {
                        "type": "string",
                        "enum": [
                          "1h",
                          "12h",
                          "24h",
                          "1w",
                          "1m",
                          "calendar_day",
                          "calendar_week_sunday",
                          "calendar_week_monday",
                          "calendar_month"
                        ]
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "environmentId",
                      "limitValue",
                      "cleanupInterval",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:read"
          ]
        }
      },
      "post": {
        "operationId": "createDefaultUserLimit",
        "tags": [
          "Limits"
        ],
        "description": "Create a default user limit. Omit environmentId for the org-wide default, or set it for a per-environment override.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:create`: Create new usage limits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "limitValue": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "model": {
                    "nullable": true,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cleanupInterval": {
                    "type": "string",
                    "enum": [
                      "1h",
                      "12h",
                      "24h",
                      "1w",
                      "1m",
                      "calendar_day",
                      "calendar_week_sunday",
                      "calendar_week_monday",
                      "calendar_month"
                    ]
                  }
                },
                "required": [
                  "limitValue"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "limitValue": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "model": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cleanupInterval": {
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "environmentId",
                    "limitValue",
                    "cleanupInterval",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:create"
          ]
        }
      }
    },
    "/api/default-user-limits/{id}": {
      "patch": {
        "operationId": "updateDefaultUserLimit",
        "tags": [
          "Limits"
        ],
        "description": "Update a per-environment default user limit.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:update`: Modify existing usage limits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limitValue": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "model": {
                    "nullable": true,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cleanupInterval": {
                    "type": "string",
                    "enum": [
                      "1h",
                      "12h",
                      "24h",
                      "1w",
                      "1m",
                      "calendar_day",
                      "calendar_week_sunday",
                      "calendar_week_monday",
                      "calendar_month"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "limitValue": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "model": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cleanupInterval": {
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "environmentId",
                    "limitValue",
                    "cleanupInterval",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteDefaultUserLimit",
        "tags": [
          "Limits"
        ],
        "description": "Delete a per-environment default user limit.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:delete`: Remove usage limits",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:delete"
          ]
        }
      }
    },
    "/api/environments": {
      "get": {
        "operationId": "listEnvironments",
        "tags": [
          "Organization"
        ],
        "description": "List org-level deployment environments with their assigned catalog counts, plus the count of catalog items with no environment (the default environment).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`environment:read`: View and list deployment environments",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "environments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "namespace": {
                            "nullable": true,
                            "type": "string"
                          },
                          "networkPolicy": {
                            "nullable": true,
                            "type": "object",
                            "properties": {
                              "egressMode": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "restricted",
                                  "unrestricted"
                                ]
                              },
                              "domainPreset": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "common_dependencies",
                                  "package_managers"
                                ]
                              },
                              "allowedDomains": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "allowedCidrs": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "egressMode",
                              "domainPreset",
                              "allowedDomains",
                              "allowedCidrs"
                            ],
                            "additionalProperties": false
                          },
                          "validationRegex": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trustedImageRegistries": {
                            "nullable": true,
                            "maxItems": 200,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255,
                              "pattern": "^[a-z0-9._:/-]+$"
                            }
                          },
                          "restricted": {
                            "type": "boolean"
                          },
                          "sortOrder": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "assignedCatalogCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "name",
                          "description",
                          "namespace",
                          "networkPolicy",
                          "validationRegex",
                          "trustedImageRegistries",
                          "restricted",
                          "sortOrder",
                          "createdAt",
                          "updatedAt",
                          "assignedCatalogCount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "defaultAssignedCatalogCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "environments",
                    "defaultAssignedCatalogCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "environment:read"
          ]
        }
      },
      "post": {
        "operationId": "createEnvironment",
        "tags": [
          "Organization"
        ],
        "description": "Create an org-level deployment environment.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`environment:create`: Create deployment environments",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "description": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 500
                  },
                  "namespace": {
                    "nullable": true,
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 63,
                    "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
                  },
                  "networkPolicy": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "egressMode": {
                        "type": "string",
                        "enum": [
                          "off",
                          "restricted",
                          "unrestricted"
                        ]
                      },
                      "domainPreset": {
                        "type": "string",
                        "enum": [
                          "none",
                          "common_dependencies",
                          "package_managers"
                        ]
                      },
                      "allowedDomains": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 253,
                          "pattern": "^(\\*\\.)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$"
                        }
                      },
                      "allowedCidrs": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "restricted": {
                    "type": "boolean"
                  },
                  "validationRegex": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 1000
                  },
                  "trustedImageRegistries": {
                    "nullable": true,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "pattern": "^[a-z0-9._:/-]+$"
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "namespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "networkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "validationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "trustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "restricted": {
                      "type": "boolean"
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "description",
                    "namespace",
                    "networkPolicy",
                    "validationRegex",
                    "trustedImageRegistries",
                    "restricted",
                    "sortOrder",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "environment:create"
          ]
        }
      }
    },
    "/api/environments/{id}": {
      "patch": {
        "operationId": "updateEnvironment",
        "tags": [
          "Organization"
        ],
        "description": "Update an environment's name, description, namespace, network policy, and restricted flag. When the namespace or network policy changes and the runtime is enabled, all MCP servers assigned to this environment are reconciled.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`environment:update`: Modify deployment environments, including the org default environment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "description": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 500
                  },
                  "namespace": {
                    "nullable": true,
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 63,
                    "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
                  },
                  "networkPolicy": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "egressMode": {
                        "type": "string",
                        "enum": [
                          "off",
                          "restricted",
                          "unrestricted"
                        ]
                      },
                      "domainPreset": {
                        "type": "string",
                        "enum": [
                          "none",
                          "common_dependencies",
                          "package_managers"
                        ]
                      },
                      "allowedDomains": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 253,
                          "pattern": "^(\\*\\.)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$"
                        }
                      },
                      "allowedCidrs": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "restricted": {
                    "type": "boolean"
                  },
                  "validationRegex": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 1000
                  },
                  "trustedImageRegistries": {
                    "nullable": true,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "pattern": "^[a-z0-9._:/-]+$"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "namespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "networkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "validationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "trustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "restricted": {
                      "type": "boolean"
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "description",
                    "namespace",
                    "networkPolicy",
                    "validationRegex",
                    "trustedImageRegistries",
                    "restricted",
                    "sortOrder",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "environment:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteEnvironment",
        "tags": [
          "Organization"
        ],
        "description": "Delete an org-level environment. Fails with 409 if any catalog items are still assigned to it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`environment:delete`: Delete deployment environments",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "environment:delete"
          ]
        }
      }
    },
    "/v1/gemini/embeddings": {
      "post": {
        "operationId": "geminiEmbeddingsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Gemini (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/gemini/{agentId}/embeddings": {
      "post": {
        "operationId": "geminiEmbeddingsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Gemini for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/gemini/v1beta/models/{model}:generateContent": {
      "post": {
        "summary": "Generate content using Gemini",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Generate content using Gemini (default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeminiGenerateContentRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "model",
            "required": true,
            "description": "The model to use"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-goog-api-key",
            "required": false,
            "description": "API key for Google Gemini. Required for Google AI Studio mode, optional for Vertex AI mode (uses ADC)."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeminiGenerateContentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/gemini/v1beta/models/{model}:streamGenerateContent": {
      "post": {
        "summary": "Stream generated content using Gemini",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Stream generated content using Gemini (default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeminiGenerateContentRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "model",
            "required": true,
            "description": "The model to use"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-goog-api-key",
            "required": false,
            "description": "API key for Google Gemini. Required for Google AI Studio mode, optional for Vertex AI mode (uses ADC)."
          }
        ],
        "responses": {
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/gemini/{agentId}/v1beta/models/{model}:generateContent": {
      "post": {
        "summary": "Generate content using Gemini (specific agent)",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Generate content using Gemini with specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeminiGenerateContentRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "model",
            "required": true,
            "description": "The model to use"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-goog-api-key",
            "required": false,
            "description": "API key for Google Gemini. Required for Google AI Studio mode, optional for Vertex AI mode (uses ADC)."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeminiGenerateContentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/gemini/{agentId}/v1beta/models/{model}:streamGenerateContent": {
      "post": {
        "summary": "Stream generated content using Gemini (specific agent)",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Stream generated content using Gemini with specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeminiGenerateContentRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "model",
            "required": true,
            "description": "The model to use"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-goog-api-key",
            "required": false,
            "description": "API key for Google Gemini. Required for Google AI Studio mode, optional for Vertex AI mode (uses ADC)."
          }
        ],
        "responses": {
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/github-app-configs": {
      "get": {
        "operationId": "listGithubAppConfigs",
        "tags": [
          "GitHub App Configs"
        ],
        "description": "List organization GitHub App configurations. The private key is never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:read`: View GitHub App configurations",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "githubUrl": {
                        "type": "string"
                      },
                      "appId": {
                        "type": "string"
                      },
                      "installationId": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "name",
                      "githubUrl",
                      "appId",
                      "installationId",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:read"
          ]
        }
      },
      "post": {
        "operationId": "createGithubAppConfig",
        "tags": [
          "GitHub App Configs"
        ],
        "description": "Create a GitHub App configuration. The private key is stored as a secret and never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:create`: Create GitHub App configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "githubUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "appId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "privateKey": {
                    "type": "string",
                    "minLength": 1,
                    "description": "GitHub App private key PEM"
                  }
                },
                "required": [
                  "name",
                  "appId",
                  "installationId",
                  "privateKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "githubUrl": {
                      "type": "string"
                    },
                    "appId": {
                      "type": "string"
                    },
                    "installationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "githubUrl",
                    "appId",
                    "installationId",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:create"
          ]
        }
      }
    },
    "/api/github-app-configs/{id}": {
      "get": {
        "operationId": "getGithubAppConfig",
        "tags": [
          "GitHub App Configs"
        ],
        "description": "Get a GitHub App configuration. The private key is never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:read`: View GitHub App configurations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "githubUrl": {
                      "type": "string"
                    },
                    "appId": {
                      "type": "string"
                    },
                    "installationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "githubUrl",
                    "appId",
                    "installationId",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:read"
          ]
        }
      },
      "put": {
        "operationId": "updateGithubAppConfig",
        "tags": [
          "GitHub App Configs"
        ],
        "description": "Update a GitHub App configuration. Provide a private key only to rotate it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:update`: Modify GitHub App configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "githubUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "appId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "privateKey": {
                    "type": "string",
                    "minLength": 1,
                    "description": "GitHub App private key PEM"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "githubUrl": {
                      "type": "string"
                    },
                    "appId": {
                      "type": "string"
                    },
                    "installationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "githubUrl",
                    "appId",
                    "installationId",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteGithubAppConfig",
        "tags": [
          "GitHub App Configs"
        ],
        "description": "Delete a GitHub App configuration and its stored private key.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:delete`: Delete GitHub App configurations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:delete"
          ]
        }
      }
    },
    "/api/github-copilot-auth/device/start": {
      "post": {
        "operationId": "githubCopilotDeviceAuthStart",
        "tags": [
          "GitHub Copilot Auth"
        ],
        "description": "Start the GitHub device flow used to connect a GitHub Copilot subscription\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deviceCode": {
                      "type": "string"
                    },
                    "userCode": {
                      "type": "string"
                    },
                    "verificationUri": {
                      "type": "string"
                    },
                    "interval": {
                      "type": "number"
                    },
                    "expiresIn": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "deviceCode",
                    "userCode",
                    "verificationUri",
                    "interval",
                    "expiresIn"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/github-copilot-auth/device/poll": {
      "post": {
        "operationId": "githubCopilotDeviceAuthPoll",
        "tags": [
          "GitHub Copilot Auth"
        ],
        "description": "Poll the GitHub device flow once; returns the GitHub OAuth token when the user has authorized\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deviceCode": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "deviceCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "slow_down"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "complete"
                          ]
                        },
                        "accessToken": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "accessToken"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/v1/github-copilot/chat/completions": {
      "post": {
        "operationId": "githubCopilotChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with GitHub Copilot (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "developer"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "system"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "input_audio"
                                            ]
                                          },
                                          "input_audio": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              },
                                              "format": {
                                                "type": "string",
                                                "enum": [
                                                  "wav",
                                                  "mp3"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "data",
                                              "format"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "input_audio"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "file"
                                            ]
                                          },
                                          "file": {
                                            "type": "object",
                                            "properties": {
                                              "file_data": {
                                                "type": "string"
                                              },
                                              "file_id": {
                                                "type": "string"
                                              },
                                              "filename": {
                                                "type": "string"
                                              }
                                            },
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "file"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "audio": {
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "refusal"
                                        ]
                                      },
                                      "refusal": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "refusal"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                  }
                                }
                              ]
                            },
                            "function_call": {
                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "arguments": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "arguments",
                                "name"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "reasoning_content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "refusal": {
                              "nullable": true,
                              "type": "string"
                            },
                            "tool_calls": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "arguments",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "custom"
                                        ]
                                      },
                                      "custom": {
                                        "type": "object",
                                        "properties": {
                                          "input": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "input",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "custom"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                  }
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                              }
                            }
                          },
                          "required": [
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "tool"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      }
                                    ]
                                  }
                                }
                              ]
                            },
                            "tool_call_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "tool_call_id"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "name"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                        }
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "function": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "strict": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                            }
                          },
                          "required": [
                            "type",
                            "function"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "custom": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name of the custom tool, used to identify it in tool calls"
                                },
                                "description": {
                                  "description": "Optional description of the custom tool, used to provide more context",
                                  "type": "string"
                                },
                                "format": {
                                  "description": "The input format for the custom tool. Default is unconstrained text.",
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text"
                                          ],
                                          "description": "Unconstrained text format. Always `text`"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "description": "Unconstrained free-form text"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "grammar"
                                          ]
                                        },
                                        "grammar": {
                                          "type": "object",
                                          "properties": {
                                            "definition": {
                                              "type": "string",
                                              "description": "The grammar definition"
                                            },
                                            "syntax": {
                                              "type": "string",
                                              "enum": [
                                                "lark",
                                                "regex"
                                              ],
                                              "description": "The syntax of the grammar definition"
                                            }
                                          },
                                          "required": [
                                            "definition",
                                            "syntax"
                                          ],
                                          "description": "Your chosen grammar"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "grammar"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "custom"
                          ],
                          "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                        }
                      ],
                      "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                    }
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "none",
                          "auto",
                          "required"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "allowed_tools"
                            ]
                          },
                          "allowed_tools": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "required"
                                ],
                                "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                              },
                              "tools": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                  }
                                },
                                "description": "A list of tool definitions that the model should be allowed to call"
                              }
                            },
                            "required": [
                              "mode",
                              "tools"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                          }
                        },
                        "required": [
                          "type",
                          "allowed_tools"
                        ],
                        "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "function"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "custom"
                            ]
                          },
                          "custom": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the custom tool, used to identify it in tool calls"
                              },
                              "description": {
                                "description": "Optional description of the custom tool, used to provide more context",
                                "type": "string"
                              },
                              "format": {
                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ],
                                        "description": "Unconstrained text format. Always `text`"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "description": "Unconstrained free-form text"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "grammar"
                                        ]
                                      },
                                      "grammar": {
                                        "type": "object",
                                        "properties": {
                                          "definition": {
                                            "type": "string",
                                            "description": "The grammar definition"
                                          },
                                          "syntax": {
                                            "type": "string",
                                            "enum": [
                                              "lark",
                                              "regex"
                                            ],
                                            "description": "The syntax of the grammar definition"
                                          }
                                        },
                                        "required": [
                                          "definition",
                                          "syntax"
                                        ],
                                        "description": "Your chosen grammar"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "grammar"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "custom"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                      }
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_completion_tokens": {
                    "nullable": true,
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "reasoning_effort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "none",
                      "minimal",
                      "low",
                      "medium",
                      "high",
                      "xhigh"
                    ]
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "finish_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "length",
                                  "tool_calls",
                                  "content_filter",
                                  "function_call"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "index": {
                            "type": "number"
                          },
                          "logprobs": {
                            "nullable": true
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "refusal": {
                                "nullable": true,
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "annotations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              },
                              "audio": {
                                "nullable": true
                              },
                              "function_call": {
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "reasoning_content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "tool_calls": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "input": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "input",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                }
                              }
                            },
                            "required": [
                              "role"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                          }
                        },
                        "required": [
                          "finish_reason",
                          "logprobs",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                      }
                    },
                    "created": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    },
                    "server_tier": {
                      "type": "string"
                    },
                    "system_fingerprint": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "completion_tokens": {
                          "type": "number"
                        },
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        },
                        "completion_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                        },
                        "prompt_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                        }
                      },
                      "required": [
                        "completion_tokens",
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                    }
                  },
                  "required": [
                    "id",
                    "choices",
                    "model"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/github-copilot/{agentId}/chat/completions": {
      "post": {
        "operationId": "githubCopilotChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with GitHub Copilot for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "developer"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "system"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "input_audio"
                                            ]
                                          },
                                          "input_audio": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              },
                                              "format": {
                                                "type": "string",
                                                "enum": [
                                                  "wav",
                                                  "mp3"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "data",
                                              "format"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "input_audio"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "file"
                                            ]
                                          },
                                          "file": {
                                            "type": "object",
                                            "properties": {
                                              "file_data": {
                                                "type": "string"
                                              },
                                              "file_id": {
                                                "type": "string"
                                              },
                                              "filename": {
                                                "type": "string"
                                              }
                                            },
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "file"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "audio": {
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "refusal"
                                        ]
                                      },
                                      "refusal": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "refusal"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                  }
                                }
                              ]
                            },
                            "function_call": {
                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "arguments": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "arguments",
                                "name"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "reasoning_content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "refusal": {
                              "nullable": true,
                              "type": "string"
                            },
                            "tool_calls": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "arguments",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "custom"
                                        ]
                                      },
                                      "custom": {
                                        "type": "object",
                                        "properties": {
                                          "input": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "input",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "custom"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                  }
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                              }
                            }
                          },
                          "required": [
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "tool"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      }
                                    ]
                                  }
                                }
                              ]
                            },
                            "tool_call_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "tool_call_id"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "name"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                        }
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "function": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "strict": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                            }
                          },
                          "required": [
                            "type",
                            "function"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "custom": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name of the custom tool, used to identify it in tool calls"
                                },
                                "description": {
                                  "description": "Optional description of the custom tool, used to provide more context",
                                  "type": "string"
                                },
                                "format": {
                                  "description": "The input format for the custom tool. Default is unconstrained text.",
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text"
                                          ],
                                          "description": "Unconstrained text format. Always `text`"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "description": "Unconstrained free-form text"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "grammar"
                                          ]
                                        },
                                        "grammar": {
                                          "type": "object",
                                          "properties": {
                                            "definition": {
                                              "type": "string",
                                              "description": "The grammar definition"
                                            },
                                            "syntax": {
                                              "type": "string",
                                              "enum": [
                                                "lark",
                                                "regex"
                                              ],
                                              "description": "The syntax of the grammar definition"
                                            }
                                          },
                                          "required": [
                                            "definition",
                                            "syntax"
                                          ],
                                          "description": "Your chosen grammar"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "grammar"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "custom"
                          ],
                          "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                        }
                      ],
                      "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                    }
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "none",
                          "auto",
                          "required"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "allowed_tools"
                            ]
                          },
                          "allowed_tools": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "required"
                                ],
                                "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                              },
                              "tools": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                  }
                                },
                                "description": "A list of tool definitions that the model should be allowed to call"
                              }
                            },
                            "required": [
                              "mode",
                              "tools"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                          }
                        },
                        "required": [
                          "type",
                          "allowed_tools"
                        ],
                        "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "function"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "custom"
                            ]
                          },
                          "custom": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the custom tool, used to identify it in tool calls"
                              },
                              "description": {
                                "description": "Optional description of the custom tool, used to provide more context",
                                "type": "string"
                              },
                              "format": {
                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ],
                                        "description": "Unconstrained text format. Always `text`"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "description": "Unconstrained free-form text"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "grammar"
                                        ]
                                      },
                                      "grammar": {
                                        "type": "object",
                                        "properties": {
                                          "definition": {
                                            "type": "string",
                                            "description": "The grammar definition"
                                          },
                                          "syntax": {
                                            "type": "string",
                                            "enum": [
                                              "lark",
                                              "regex"
                                            ],
                                            "description": "The syntax of the grammar definition"
                                          }
                                        },
                                        "required": [
                                          "definition",
                                          "syntax"
                                        ],
                                        "description": "Your chosen grammar"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "grammar"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "custom"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                      }
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_completion_tokens": {
                    "nullable": true,
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "reasoning_effort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "none",
                      "minimal",
                      "low",
                      "medium",
                      "high",
                      "xhigh"
                    ]
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "finish_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "length",
                                  "tool_calls",
                                  "content_filter",
                                  "function_call"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "index": {
                            "type": "number"
                          },
                          "logprobs": {
                            "nullable": true
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "refusal": {
                                "nullable": true,
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "annotations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              },
                              "audio": {
                                "nullable": true
                              },
                              "function_call": {
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "reasoning_content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "tool_calls": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "input": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "input",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                }
                              }
                            },
                            "required": [
                              "role"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                          }
                        },
                        "required": [
                          "finish_reason",
                          "logprobs",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                      }
                    },
                    "created": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    },
                    "server_tier": {
                      "type": "string"
                    },
                    "system_fingerprint": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "completion_tokens": {
                          "type": "number"
                        },
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        },
                        "completion_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                        },
                        "prompt_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                        }
                      },
                      "required": [
                        "completion_tokens",
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                    }
                  },
                  "required": [
                    "id",
                    "choices",
                    "model"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/github-copilot/responses": {
      "post": {
        "operationId": "githubCopilotResponsesWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response with GitHub Copilot (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "model",
                    "output"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/github-copilot/{agentId}/responses": {
      "post": {
        "operationId": "githubCopilotResponsesWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response with GitHub Copilot for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "model",
                    "output"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/github-copilot/models": {
      "get": {
        "operationId": "githubCopilotListModelsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List GitHub Copilot models (default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/github-copilot/{agentId}/models": {
      "get": {
        "operationId": "githubCopilotListModelsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List GitHub Copilot models (specific agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/github-pats": {
      "get": {
        "operationId": "listGithubPats",
        "tags": [
          "GitHub PATs"
        ],
        "description": "List organization GitHub personal access tokens. The token value is never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:read`: View GitHub App configurations",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "name",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:read"
          ]
        }
      },
      "post": {
        "operationId": "createGithubPat",
        "tags": [
          "GitHub PATs"
        ],
        "description": "Store a GitHub personal access token. The token is stored as a secret and never returned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:create`: Create GitHub App configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "description": "GitHub personal access token"
                  }
                },
                "required": [
                  "name",
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:create"
          ]
        }
      }
    },
    "/api/github-pats/{id}": {
      "put": {
        "operationId": "updateGithubPat",
        "tags": [
          "GitHub PATs"
        ],
        "description": "Rename a stored GitHub token. Provide a token only to rotate it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:update`: Modify GitHub App configurations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "token": {
                    "description": "Provide only to rotate the stored token.",
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteGithubPat",
        "tags": [
          "GitHub PATs"
        ],
        "description": "Delete a stored GitHub token and its secret. Rejected while synced skills authenticate with it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`githubAppConfig:delete`: Delete GitHub App configurations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "githubAppConfig:delete"
          ]
        }
      }
    },
    "/v1/groq/chat/completions": {
      "post": {
        "operationId": "groqChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Groq (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroqChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/groq/{agentId}/chat/completions": {
      "post": {
        "operationId": "groqChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Groq for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroqChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "status",
                    "version"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/ready": {
      "get": {
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "maintenance"
                      ]
                    },
                    "version": {
                      "type": "string"
                    },
                    "database": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "not_checked"
                      ]
                    },
                    "sandbox": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "initializing",
                        "disabled",
                        "unreachable"
                      ]
                    },
                    "sandboxReason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "status",
                    "version",
                    "database",
                    "sandbox"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "degraded"
                      ]
                    },
                    "version": {
                      "type": "string"
                    },
                    "database": {
                      "type": "string",
                      "enum": [
                        "disconnected"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "status",
                    "version",
                    "database"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/hooks": {
      "get": {
        "operationId": "getHooks",
        "tags": [
          "Hooks"
        ],
        "description": "List hook files for an agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agent:read`: View and list agents",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "event": {
                        "type": "string",
                        "enum": [
                          "session_start",
                          "pre_tool_use",
                          "post_tool_use"
                        ]
                      },
                      "fileName": {
                        "type": "string"
                      },
                      "content": {
                        "type": "string"
                      },
                      "requirements": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "agentId",
                      "event",
                      "fileName",
                      "content",
                      "requirements",
                      "enabled",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agent:read"
          ]
        }
      },
      "post": {
        "operationId": "createHook",
        "tags": [
          "Hooks"
        ],
        "description": "Create a new hook file for an agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agent:update`: Modify agent configuration and settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "session_start",
                      "pre_tool_use",
                      "post_tool_use"
                    ]
                  },
                  "fileName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*\\.(py|sh)$"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "requirements": {
                    "default": [],
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "agentId",
                  "event",
                  "fileName",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "event": {
                      "type": "string",
                      "enum": [
                        "session_start",
                        "pre_tool_use",
                        "post_tool_use"
                      ]
                    },
                    "fileName": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "requirements": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "agentId",
                    "event",
                    "fileName",
                    "content",
                    "requirements",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agent:update"
          ]
        }
      }
    },
    "/api/hooks/{id}": {
      "put": {
        "operationId": "updateHook",
        "tags": [
          "Hooks"
        ],
        "description": "Update an existing hook file\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agent:update`: Modify agent configuration and settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string",
                    "enum": [
                      "session_start",
                      "pre_tool_use",
                      "post_tool_use"
                    ]
                  },
                  "fileName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*\\.(py|sh)$"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "requirements": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "event": {
                      "type": "string",
                      "enum": [
                        "session_start",
                        "pre_tool_use",
                        "post_tool_use"
                      ]
                    },
                    "fileName": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "requirements": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "agentId",
                    "event",
                    "fileName",
                    "content",
                    "requirements",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agent:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteHook",
        "tags": [
          "Hooks"
        ],
        "description": "Delete a hook file\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agent:update`: Modify agent configuration and settings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agent:update"
          ]
        }
      }
    },
    "/api/webhooks/incoming-email": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "description": "Webhook endpoint for incoming email notifications",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean"
                        },
                        "processed": {
                          "type": "number"
                        },
                        "errors": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "success"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/{agentId}/email-address": {
      "get": {
        "operationId": "getAgentEmailAddress",
        "tags": [
          "Agents"
        ],
        "description": "Get the email address for invoking an agent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providerEnabled": {
                      "type": "boolean"
                    },
                    "emailAddress": {
                      "nullable": true,
                      "type": "string"
                    },
                    "agentIncomingEmailEnabled": {
                      "type": "boolean"
                    },
                    "agentSecurityMode": {
                      "type": "string",
                      "enum": [
                        "private",
                        "internal",
                        "public"
                      ]
                    },
                    "agentAllowedDomain": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "providerEnabled",
                    "emailAddress",
                    "agentIncomingEmailEnabled",
                    "agentSecurityMode",
                    "agentAllowedDomain"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/incoming-email/status": {
      "get": {
        "operationId": "getIncomingEmailStatus",
        "tags": [
          "Incoming Email"
        ],
        "description": "Get the current incoming email webhook subscription status\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:read`: View agent trigger configurations (Slack, MS Teams, email)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "isActive": {
                      "type": "boolean"
                    },
                    "subscription": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "subscriptionId": {
                          "type": "string"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "webhookUrl": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                        }
                      },
                      "required": [
                        "id",
                        "subscriptionId",
                        "provider",
                        "webhookUrl",
                        "expiresAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "isActive",
                    "subscription"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:read"
          ]
        }
      }
    },
    "/api/incoming-email/setup": {
      "post": {
        "operationId": "setupIncomingEmailWebhook",
        "tags": [
          "Incoming Email"
        ],
        "description": "Setup or renew incoming email webhook subscription\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:create`: Set up new agent triggers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "subscriptionId": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:create"
          ]
        }
      }
    },
    "/api/incoming-email/renew": {
      "post": {
        "operationId": "renewIncomingEmailSubscription",
        "tags": [
          "Incoming Email"
        ],
        "description": "Renew the incoming email webhook subscription\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:update`: Modify agent trigger configurations",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "subscriptionId": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:update"
          ]
        }
      }
    },
    "/api/incoming-email/subscription": {
      "delete": {
        "operationId": "deleteIncomingEmailSubscription",
        "tags": [
          "Incoming Email"
        ],
        "description": "Delete the incoming email webhook subscription\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentTrigger:delete`: Remove agent triggers",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentTrigger:delete"
          ]
        }
      }
    },
    "/api/interactions": {
      "get": {
        "operationId": "getInteractions",
        "tags": [
          "Interaction"
        ],
        "description": "Get all interactions with pagination and sorting\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`log:read`: View your own LLM proxy and MCP tool call logs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "profileId",
            "required": false,
            "description": "Filter by profile ID (internal Archestra profile)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "externalAgentId",
            "required": false,
            "description": "Filter by external agent ID (from X-Archestra-Agent-Id header)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "userId",
            "required": false,
            "description": "Filter by user ID (from X-Archestra-User-Id header)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "sessionId",
            "required": false,
            "description": "Filter by session ID"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "in": "query",
            "name": "startDate",
            "required": false,
            "description": "Filter by start date (ISO 8601 format)"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "in": "query",
            "name": "endDate",
            "required": false,
            "description": "Filter by end date (ISO 8601 format)"
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "profileId",
                "externalAgentId",
                "model",
                "userId"
              ]
            },
            "in": "query",
            "name": "sortBy",
            "required": false
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OpenAiChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "openai:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          }
                                        ]
                                      },
                                      "instructions": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "max_output_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "metadata": {
                                        "nullable": true,
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "previous_response_id": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "text": {},
                                      "tool_choice": {},
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "parameters": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "strict": {
                                                  "nullable": true,
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "name"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          ]
                                        }
                                      },
                                      "top_p": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "user": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          }
                                        ]
                                      },
                                      "instructions": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "max_output_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "metadata": {
                                        "nullable": true,
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "previous_response_id": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "text": {},
                                      "tool_choice": {},
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "parameters": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "strict": {
                                                  "nullable": true,
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "name"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          ]
                                        }
                                      },
                                      "top_p": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "user": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "response"
                                        ]
                                      },
                                      "created_at": {
                                        "type": "number"
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "output": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "message"
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "status": {
                                                  "type": "string"
                                                },
                                                "content": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "output_text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": {},
                                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": {},
                                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "role",
                                                "status",
                                                "content"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function_call"
                                                  ]
                                                },
                                                "id": {
                                                  "type": "string"
                                                },
                                                "call_id": {
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "arguments": {
                                                  "type": "string"
                                                },
                                                "status": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "call_id",
                                                "name",
                                                "arguments"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "input_tokens": {
                                            "type": "number"
                                          },
                                          "output_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "input_tokens",
                                          "output_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "object",
                                      "created_at",
                                      "model",
                                      "output",
                                      "status"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "openai:responses"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        ]
                                      },
                                      "dimensions": {
                                        "type": "number"
                                      },
                                      "encoding_format": {
                                        "type": "string",
                                        "enum": [
                                          "float",
                                          "base64"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "input"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        ]
                                      },
                                      "dimensions": {
                                        "type": "number"
                                      },
                                      "encoding_format": {
                                        "type": "string",
                                        "enum": [
                                          "float",
                                          "base64"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "input"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "list"
                                        ]
                                      },
                                      "data": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "object": {
                                              "type": "string",
                                              "enum": [
                                                "embedding"
                                              ]
                                            },
                                            "embedding": {
                                              "type": "array",
                                              "items": {
                                                "type": "number"
                                              }
                                            },
                                            "index": {
                                              "type": "number"
                                            },
                                            "truncatedFrom": {
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "object",
                                            "embedding"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "prompt_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "prompt_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "object",
                                      "data",
                                      "model",
                                      "usage"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "openai:embeddings"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        ]
                                      },
                                      "dimensions": {
                                        "type": "number"
                                      },
                                      "encoding_format": {
                                        "type": "string",
                                        "enum": [
                                          "float",
                                          "base64"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "input"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        ]
                                      },
                                      "dimensions": {
                                        "type": "number"
                                      },
                                      "encoding_format": {
                                        "type": "string",
                                        "enum": [
                                          "float",
                                          "base64"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "input"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "list"
                                        ]
                                      },
                                      "data": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "object": {
                                              "type": "string",
                                              "enum": [
                                                "embedding"
                                              ]
                                            },
                                            "embedding": {
                                              "type": "array",
                                              "items": {
                                                "type": "number"
                                              }
                                            },
                                            "index": {
                                              "type": "number"
                                            },
                                            "truncatedFrom": {
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "object",
                                            "embedding"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "prompt_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "prompt_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "object",
                                      "data",
                                      "model",
                                      "usage"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "gemini:embeddings"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        ]
                                      },
                                      "dimensions": {
                                        "type": "number"
                                      },
                                      "encoding_format": {
                                        "type": "string",
                                        "enum": [
                                          "float",
                                          "base64"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "input"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        ]
                                      },
                                      "dimensions": {
                                        "type": "number"
                                      },
                                      "encoding_format": {
                                        "type": "string",
                                        "enum": [
                                          "float",
                                          "base64"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "input"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "list"
                                        ]
                                      },
                                      "data": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "object": {
                                              "type": "string",
                                              "enum": [
                                                "embedding"
                                              ]
                                            },
                                            "embedding": {
                                              "type": "array",
                                              "items": {
                                                "type": "number"
                                              }
                                            },
                                            "index": {
                                              "type": "number"
                                            },
                                            "truncatedFrom": {
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "object",
                                            "embedding"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "prompt_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "prompt_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "object",
                                      "data",
                                      "model",
                                      "usage"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "bedrock:embeddings"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/GeminiGenerateContentRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/GeminiGenerateContentRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/GeminiGenerateContentResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "gemini:generateContent"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/AnthropicMessagesRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/AnthropicMessagesRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/AnthropicMessagesResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "anthropic:messages"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "modelId": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "role": {
                                              "type": "string",
                                              "enum": [
                                                "user",
                                                "assistant"
                                              ]
                                            },
                                            "content": {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "text": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "text"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "image": {
                                                        "type": "object",
                                                        "properties": {
                                                          "format": {
                                                            "type": "string",
                                                            "enum": [
                                                              "png",
                                                              "jpeg",
                                                              "gif",
                                                              "webp"
                                                            ]
                                                          },
                                                          "source": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "bytes": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "bytes"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "s3Location": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "uri": {
                                                                        "type": "string"
                                                                      },
                                                                      "bucketOwner": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "uri"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                },
                                                                "required": [
                                                                  "s3Location"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "format",
                                                          "source"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "image"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "document": {
                                                        "type": "object",
                                                        "properties": {
                                                          "format": {
                                                            "type": "string",
                                                            "enum": [
                                                              "pdf",
                                                              "csv",
                                                              "doc",
                                                              "docx",
                                                              "xls",
                                                              "xlsx",
                                                              "html",
                                                              "txt",
                                                              "md"
                                                            ]
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "source": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "bytes": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "bytes"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "s3Location": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "uri": {
                                                                        "type": "string"
                                                                      },
                                                                      "bucketOwner": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "uri"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                },
                                                                "required": [
                                                                  "s3Location"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "format",
                                                          "name",
                                                          "source"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "document"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "guardContent": {
                                                        "type": "object",
                                                        "properties": {
                                                          "text": {
                                                            "type": "object",
                                                            "properties": {
                                                              "text": {
                                                                "type": "string"
                                                              },
                                                              "qualifiers": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "grounding_source",
                                                                    "query",
                                                                    "guard_content"
                                                                  ]
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "text"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        },
                                                        "required": [
                                                          "text"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "guardContent"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "toolUse": {
                                                        "type": "object",
                                                        "properties": {
                                                          "toolUseId": {
                                                            "type": "string"
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "input": {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        },
                                                        "required": [
                                                          "toolUseId",
                                                          "name",
                                                          "input"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "toolUse"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "toolResult": {
                                                        "type": "object",
                                                        "properties": {
                                                          "toolUseId": {
                                                            "type": "string"
                                                          },
                                                          "content": {
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "text": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "text"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "image": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "format": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "png",
                                                                            "jpeg",
                                                                            "gif",
                                                                            "webp"
                                                                          ]
                                                                        },
                                                                        "source": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "bytes": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "bytes"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "s3Location": {
                                                                                  "type": "object",
                                                                                  "properties": {
                                                                                    "uri": {
                                                                                      "type": "string"
                                                                                    },
                                                                                    "bucketOwner": {
                                                                                      "type": "string"
                                                                                    }
                                                                                  },
                                                                                  "required": [
                                                                                    "uri"
                                                                                  ],
                                                                                  "additionalProperties": false
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "s3Location"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "format",
                                                                        "source"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "image"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "json": {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "json"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "document": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "format": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "pdf",
                                                                            "csv",
                                                                            "doc",
                                                                            "docx",
                                                                            "xls",
                                                                            "xlsx",
                                                                            "html",
                                                                            "txt",
                                                                            "md"
                                                                          ]
                                                                        },
                                                                        "name": {
                                                                          "type": "string"
                                                                        },
                                                                        "source": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "bytes": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "bytes"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "s3Location": {
                                                                                  "type": "object",
                                                                                  "properties": {
                                                                                    "uri": {
                                                                                      "type": "string"
                                                                                    },
                                                                                    "bucketOwner": {
                                                                                      "type": "string"
                                                                                    }
                                                                                  },
                                                                                  "required": [
                                                                                    "uri"
                                                                                  ],
                                                                                  "additionalProperties": false
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "s3Location"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "format",
                                                                        "name",
                                                                        "source"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "document"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "status": {
                                                            "type": "string",
                                                            "enum": [
                                                              "success",
                                                              "error"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "toolUseId",
                                                          "content"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "toolResult"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "cachePoint": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string"
                                                          },
                                                          "ttl": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "cachePoint"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "reasoningContent": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "reasoningText": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "text": {
                                                                    "type": "string"
                                                                  },
                                                                  "signature": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "text"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            },
                                                            "required": [
                                                              "reasoningText"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "redactedReasoning": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            },
                                                            "required": [
                                                              "redactedReasoning"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "reasoningContent"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "role",
                                            "content"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "system": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "guardContent": {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "object",
                                                      "properties": {
                                                        "text": {
                                                          "type": "string"
                                                        },
                                                        "qualifiers": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grounding_source",
                                                              "query",
                                                              "guard_content"
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "text"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "required": [
                                                    "text"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "guardContent"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "cachePoint": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string"
                                                    },
                                                    "ttl": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "cachePoint"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      "inferenceConfig": {
                                        "type": "object",
                                        "properties": {
                                          "maxTokens": {
                                            "type": "number"
                                          },
                                          "temperature": {
                                            "type": "number"
                                          },
                                          "topP": {
                                            "type": "number"
                                          },
                                          "stopSequences": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "toolConfig": {
                                        "type": "object",
                                        "properties": {
                                          "tools": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "toolSpec": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "type": "string"
                                                    },
                                                    "inputSchema": {
                                                      "type": "object",
                                                      "properties": {
                                                        "json": {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      },
                                                      "required": [
                                                        "json"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "required": [
                                                    "name",
                                                    "inputSchema"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "toolSpec"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "toolChoice": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "tool": {
                                                    "type": "object",
                                                    "properties": {
                                                      "name": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "tool"
                                                ],
                                                "additionalProperties": {}
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "any": {
                                                    "type": "object",
                                                    "properties": {},
                                                    "additionalProperties": {}
                                                  }
                                                },
                                                "required": [
                                                  "any"
                                                ],
                                                "additionalProperties": {}
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "auto": {
                                                    "type": "object",
                                                    "properties": {},
                                                    "additionalProperties": {}
                                                  }
                                                },
                                                "required": [
                                                  "auto"
                                                ],
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "tools"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "guardrailConfig": {
                                        "type": "object",
                                        "properties": {
                                          "guardrailIdentifier": {
                                            "type": "string"
                                          },
                                          "guardrailVersion": {
                                            "type": "string"
                                          },
                                          "trace": {
                                            "type": "string",
                                            "enum": [
                                              "enabled",
                                              "disabled"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "guardrailIdentifier",
                                          "guardrailVersion"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "additionalModelRequestFields": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "additionalModelResponseFieldPaths": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "promptVariables": {
                                        "type": "object",
                                        "additionalProperties": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "json": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              },
                                              "required": [
                                                "json"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      },
                                      "performanceConfig": {
                                        "type": "object",
                                        "properties": {
                                          "latency": {
                                            "type": "string",
                                            "enum": [
                                              "optimized"
                                            ]
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "serviceTier": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "default",
                                              "throughput"
                                            ]
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "requestMetadata": {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "_isStreaming": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "modelId": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "role": {
                                              "type": "string",
                                              "enum": [
                                                "user",
                                                "assistant"
                                              ]
                                            },
                                            "content": {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "text": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "text"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "image": {
                                                        "type": "object",
                                                        "properties": {
                                                          "format": {
                                                            "type": "string",
                                                            "enum": [
                                                              "png",
                                                              "jpeg",
                                                              "gif",
                                                              "webp"
                                                            ]
                                                          },
                                                          "source": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "bytes": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "bytes"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "s3Location": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "uri": {
                                                                        "type": "string"
                                                                      },
                                                                      "bucketOwner": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "uri"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                },
                                                                "required": [
                                                                  "s3Location"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "format",
                                                          "source"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "image"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "document": {
                                                        "type": "object",
                                                        "properties": {
                                                          "format": {
                                                            "type": "string",
                                                            "enum": [
                                                              "pdf",
                                                              "csv",
                                                              "doc",
                                                              "docx",
                                                              "xls",
                                                              "xlsx",
                                                              "html",
                                                              "txt",
                                                              "md"
                                                            ]
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "source": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "bytes": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "bytes"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "s3Location": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "uri": {
                                                                        "type": "string"
                                                                      },
                                                                      "bucketOwner": {
                                                                        "type": "string"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "uri"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  }
                                                                },
                                                                "required": [
                                                                  "s3Location"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "format",
                                                          "name",
                                                          "source"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "document"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "guardContent": {
                                                        "type": "object",
                                                        "properties": {
                                                          "text": {
                                                            "type": "object",
                                                            "properties": {
                                                              "text": {
                                                                "type": "string"
                                                              },
                                                              "qualifiers": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "grounding_source",
                                                                    "query",
                                                                    "guard_content"
                                                                  ]
                                                                }
                                                              }
                                                            },
                                                            "required": [
                                                              "text"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        },
                                                        "required": [
                                                          "text"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "guardContent"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "toolUse": {
                                                        "type": "object",
                                                        "properties": {
                                                          "toolUseId": {
                                                            "type": "string"
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "input": {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                          }
                                                        },
                                                        "required": [
                                                          "toolUseId",
                                                          "name",
                                                          "input"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "toolUse"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "toolResult": {
                                                        "type": "object",
                                                        "properties": {
                                                          "toolUseId": {
                                                            "type": "string"
                                                          },
                                                          "content": {
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "text": {
                                                                      "type": "string"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "text"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "image": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "format": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "png",
                                                                            "jpeg",
                                                                            "gif",
                                                                            "webp"
                                                                          ]
                                                                        },
                                                                        "source": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "bytes": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "bytes"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "s3Location": {
                                                                                  "type": "object",
                                                                                  "properties": {
                                                                                    "uri": {
                                                                                      "type": "string"
                                                                                    },
                                                                                    "bucketOwner": {
                                                                                      "type": "string"
                                                                                    }
                                                                                  },
                                                                                  "required": [
                                                                                    "uri"
                                                                                  ],
                                                                                  "additionalProperties": false
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "s3Location"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "format",
                                                                        "source"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "image"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "json": {
                                                                      "type": "object",
                                                                      "additionalProperties": {}
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "json"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "document": {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "format": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "pdf",
                                                                            "csv",
                                                                            "doc",
                                                                            "docx",
                                                                            "xls",
                                                                            "xlsx",
                                                                            "html",
                                                                            "txt",
                                                                            "md"
                                                                          ]
                                                                        },
                                                                        "name": {
                                                                          "type": "string"
                                                                        },
                                                                        "source": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "bytes": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "bytes"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "s3Location": {
                                                                                  "type": "object",
                                                                                  "properties": {
                                                                                    "uri": {
                                                                                      "type": "string"
                                                                                    },
                                                                                    "bucketOwner": {
                                                                                      "type": "string"
                                                                                    }
                                                                                  },
                                                                                  "required": [
                                                                                    "uri"
                                                                                  ],
                                                                                  "additionalProperties": false
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "s3Location"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "format",
                                                                        "name",
                                                                        "source"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "document"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "status": {
                                                            "type": "string",
                                                            "enum": [
                                                              "success",
                                                              "error"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "toolUseId",
                                                          "content"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "toolResult"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "cachePoint": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string"
                                                          },
                                                          "ttl": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    "required": [
                                                      "cachePoint"
                                                    ],
                                                    "additionalProperties": false
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "reasoningContent": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "reasoningText": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "text": {
                                                                    "type": "string"
                                                                  },
                                                                  "signature": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "text"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            },
                                                            "required": [
                                                              "reasoningText"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "redactedReasoning": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            },
                                                            "required": [
                                                              "redactedReasoning"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "reasoningContent"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "role",
                                            "content"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "system": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "guardContent": {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "object",
                                                      "properties": {
                                                        "text": {
                                                          "type": "string"
                                                        },
                                                        "qualifiers": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grounding_source",
                                                              "query",
                                                              "guard_content"
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "text"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "required": [
                                                    "text"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "guardContent"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "cachePoint": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string"
                                                    },
                                                    "ttl": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "cachePoint"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      "inferenceConfig": {
                                        "type": "object",
                                        "properties": {
                                          "maxTokens": {
                                            "type": "number"
                                          },
                                          "temperature": {
                                            "type": "number"
                                          },
                                          "topP": {
                                            "type": "number"
                                          },
                                          "stopSequences": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "toolConfig": {
                                        "type": "object",
                                        "properties": {
                                          "tools": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "toolSpec": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "type": "string"
                                                    },
                                                    "inputSchema": {
                                                      "type": "object",
                                                      "properties": {
                                                        "json": {
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        }
                                                      },
                                                      "required": [
                                                        "json"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "required": [
                                                    "name",
                                                    "inputSchema"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "toolSpec"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "toolChoice": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "tool": {
                                                    "type": "object",
                                                    "properties": {
                                                      "name": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "name"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "tool"
                                                ],
                                                "additionalProperties": {}
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "any": {
                                                    "type": "object",
                                                    "properties": {},
                                                    "additionalProperties": {}
                                                  }
                                                },
                                                "required": [
                                                  "any"
                                                ],
                                                "additionalProperties": {}
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "auto": {
                                                    "type": "object",
                                                    "properties": {},
                                                    "additionalProperties": {}
                                                  }
                                                },
                                                "required": [
                                                  "auto"
                                                ],
                                                "additionalProperties": {}
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "tools"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "guardrailConfig": {
                                        "type": "object",
                                        "properties": {
                                          "guardrailIdentifier": {
                                            "type": "string"
                                          },
                                          "guardrailVersion": {
                                            "type": "string"
                                          },
                                          "trace": {
                                            "type": "string",
                                            "enum": [
                                              "enabled",
                                              "disabled"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "guardrailIdentifier",
                                          "guardrailVersion"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "additionalModelRequestFields": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "additionalModelResponseFieldPaths": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "promptVariables": {
                                        "type": "object",
                                        "additionalProperties": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "json": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                }
                                              },
                                              "required": [
                                                "json"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      },
                                      "performanceConfig": {
                                        "type": "object",
                                        "properties": {
                                          "latency": {
                                            "type": "string",
                                            "enum": [
                                              "optimized"
                                            ]
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "serviceTier": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "default",
                                              "throughput"
                                            ]
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "requestMetadata": {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "_isStreaming": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "modelId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "$metadata": {
                                        "type": "object",
                                        "properties": {
                                          "httpStatusCode": {
                                            "type": "number"
                                          },
                                          "requestId": {
                                            "type": "string"
                                          },
                                          "attempts": {
                                            "type": "number"
                                          },
                                          "totalRetryDelay": {
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "output": {
                                        "type": "object",
                                        "properties": {
                                          "message": {
                                            "type": "object",
                                            "properties": {
                                              "role": {
                                                "type": "string",
                                                "enum": [
                                                  "assistant"
                                                ]
                                              },
                                              "content": {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "text"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "toolUse": {
                                                          "type": "object",
                                                          "properties": {
                                                            "toolUseId": {
                                                              "type": "string"
                                                            },
                                                            "name": {
                                                              "type": "string"
                                                            },
                                                            "input": {
                                                              "type": "object",
                                                              "additionalProperties": {}
                                                            }
                                                          },
                                                          "required": [
                                                            "toolUseId",
                                                            "name",
                                                            "input"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "required": [
                                                        "toolUse"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              }
                                            },
                                            "required": [
                                              "role",
                                              "content"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "stopReason": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "end_turn",
                                              "tool_use",
                                              "max_tokens",
                                              "stop_sequence",
                                              "guardrail_intervened",
                                              "content_filtered",
                                              "malformed_model_output",
                                              "malformed_tool_use",
                                              "model_context_window_exceeded"
                                            ]
                                          },
                                          {
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "inputTokens": {
                                            "type": "number"
                                          },
                                          "outputTokens": {
                                            "type": "number"
                                          },
                                          "totalTokens": {
                                            "type": "number"
                                          },
                                          "cacheReadInputTokens": {
                                            "type": "number"
                                          },
                                          "cacheWriteInputTokens": {
                                            "type": "number"
                                          },
                                          "cacheDetails": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "ttl": {
                                                  "type": "string"
                                                },
                                                "inputTokens": {
                                                  "type": "number"
                                                }
                                              },
                                              "additionalProperties": false
                                            }
                                          }
                                        },
                                        "required": [
                                          "inputTokens",
                                          "outputTokens"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "metrics": {
                                        "type": "object",
                                        "properties": {
                                          "latencyMs": {
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "additionalModelResponseFields": {
                                        "type": "object",
                                        "additionalProperties": {}
                                      },
                                      "trace": {
                                        "type": "object",
                                        "properties": {
                                          "guardrail": {
                                            "type": "object",
                                            "properties": {
                                              "inputAssessment": {
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "outputAssessments": {
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "modelOutput": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              "actionReason": {
                                                "type": "string"
                                              }
                                            },
                                            "additionalProperties": false
                                          },
                                          "promptRouter": {
                                            "type": "object",
                                            "properties": {
                                              "invokedModelId": {
                                                "type": "string"
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "performanceConfig": {
                                        "type": "object",
                                        "properties": {
                                          "latency": {
                                            "type": "string",
                                            "enum": [
                                              "optimized"
                                            ]
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "serviceTier": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "default",
                                              "throughput"
                                            ]
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "output",
                                      "stopReason",
                                      "usage"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "bedrock:converse"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "content": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "text": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          },
                                                          "citations": {
                                                            "nullable": true,
                                                            "type": "array",
                                                            "items": {}
                                                          }
                                                        },
                                                        "required": [
                                                          "text",
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "image"
                                                            ]
                                                          },
                                                          "source": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "base64"
                                                                    ]
                                                                  },
                                                                  "media_type": {
                                                                    "type": "string"
                                                                  },
                                                                  "data": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "media_type",
                                                                  "data"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "url"
                                                                    ]
                                                                  },
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "source"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "document"
                                                            ]
                                                          },
                                                          "source": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "base64"
                                                                    ]
                                                                  },
                                                                  "media_type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "application/pdf"
                                                                    ]
                                                                  },
                                                                  "data": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "media_type",
                                                                  "data"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "text"
                                                                    ]
                                                                  },
                                                                  "media_type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "text/plain"
                                                                    ]
                                                                  },
                                                                  "data": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "media_type",
                                                                  "data"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "url"
                                                                    ]
                                                                  },
                                                                  "url": {
                                                                    "type": "string",
                                                                    "format": "uri"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "content"
                                                                    ]
                                                                  },
                                                                  "content": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "text": {
                                                                                  "type": "string"
                                                                                },
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "text"
                                                                                  ]
                                                                                },
                                                                                "cache_control": {
                                                                                  "nullable": true
                                                                                },
                                                                                "citations": {
                                                                                  "nullable": true,
                                                                                  "type": "array",
                                                                                  "items": {}
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "text",
                                                                                "type"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "image"
                                                                                  ]
                                                                                },
                                                                                "source": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "object",
                                                                                      "properties": {
                                                                                        "type": {
                                                                                          "type": "string",
                                                                                          "enum": [
                                                                                            "base64"
                                                                                          ]
                                                                                        },
                                                                                        "media_type": {
                                                                                          "type": "string"
                                                                                        },
                                                                                        "data": {
                                                                                          "type": "string"
                                                                                        }
                                                                                      },
                                                                                      "required": [
                                                                                        "type",
                                                                                        "media_type",
                                                                                        "data"
                                                                                      ],
                                                                                      "additionalProperties": false
                                                                                    },
                                                                                    {
                                                                                      "type": "object",
                                                                                      "properties": {
                                                                                        "type": {
                                                                                          "type": "string",
                                                                                          "enum": [
                                                                                            "url"
                                                                                          ]
                                                                                        },
                                                                                        "url": {
                                                                                          "type": "string"
                                                                                        }
                                                                                      },
                                                                                      "required": [
                                                                                        "type",
                                                                                        "url"
                                                                                      ],
                                                                                      "additionalProperties": false
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "cache_control": {
                                                                                  "nullable": true
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "source"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "content"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          "title": {
                                                            "nullable": true,
                                                            "type": "string"
                                                          },
                                                          "context": {
                                                            "nullable": true,
                                                            "type": "string"
                                                          },
                                                          "citations": {
                                                            "nullable": true,
                                                            "type": "object",
                                                            "properties": {
                                                              "enabled": {
                                                                "type": "boolean"
                                                              }
                                                            },
                                                            "required": [
                                                              "enabled"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "source"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "thinking"
                                                            ]
                                                          },
                                                          "thinking": {
                                                            "type": "string"
                                                          },
                                                          "signature": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "thinking",
                                                          "signature"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "redacted_thinking"
                                                            ]
                                                          },
                                                          "data": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "data"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "input": {},
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "tool_use"
                                                            ]
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "input",
                                                          "name",
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "tool_use_id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "tool_result"
                                                            ]
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          },
                                                          "content": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "text": {
                                                                          "type": "string"
                                                                        },
                                                                        "type": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "text"
                                                                          ]
                                                                        },
                                                                        "cache_control": {
                                                                          "nullable": true
                                                                        },
                                                                        "citations": {
                                                                          "nullable": true,
                                                                          "type": "array",
                                                                          "items": {}
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "text",
                                                                        "type"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "type": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "image"
                                                                          ]
                                                                        },
                                                                        "source": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "base64"
                                                                                  ]
                                                                                },
                                                                                "media_type": {
                                                                                  "type": "string"
                                                                                },
                                                                                "data": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "media_type",
                                                                                "data"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "url"
                                                                                  ]
                                                                                },
                                                                                "url": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "url"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        "cache_control": {
                                                                          "nullable": true
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "type",
                                                                        "source"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "type": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "document"
                                                                          ]
                                                                        },
                                                                        "source": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "base64"
                                                                                  ]
                                                                                },
                                                                                "media_type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "application/pdf"
                                                                                  ]
                                                                                },
                                                                                "data": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "media_type",
                                                                                "data"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "text"
                                                                                  ]
                                                                                },
                                                                                "media_type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "text/plain"
                                                                                  ]
                                                                                },
                                                                                "data": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "media_type",
                                                                                "data"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "url"
                                                                                  ]
                                                                                },
                                                                                "url": {
                                                                                  "type": "string",
                                                                                  "format": "uri"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "url"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "content"
                                                                                  ]
                                                                                },
                                                                                "content": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "string"
                                                                                    },
                                                                                    {
                                                                                      "type": "array",
                                                                                      "items": {
                                                                                        "anyOf": [
                                                                                          {
                                                                                            "type": "object",
                                                                                            "properties": {
                                                                                              "text": {
                                                                                                "type": "string"
                                                                                              },
                                                                                              "type": {
                                                                                                "type": "string",
                                                                                                "enum": [
                                                                                                  "text"
                                                                                                ]
                                                                                              },
                                                                                              "cache_control": {
                                                                                                "nullable": true
                                                                                              },
                                                                                              "citations": {
                                                                                                "nullable": true,
                                                                                                "type": "array",
                                                                                                "items": {}
                                                                                              }
                                                                                            },
                                                                                            "required": [
                                                                                              "text",
                                                                                              "type"
                                                                                            ],
                                                                                            "additionalProperties": false
                                                                                          },
                                                                                          {
                                                                                            "type": "object",
                                                                                            "properties": {
                                                                                              "type": {
                                                                                                "type": "string",
                                                                                                "enum": [
                                                                                                  "image"
                                                                                                ]
                                                                                              },
                                                                                              "source": {
                                                                                                "anyOf": [
                                                                                                  {
                                                                                                    "type": "object",
                                                                                                    "properties": {
                                                                                                      "type": {
                                                                                                        "type": "string",
                                                                                                        "enum": [
                                                                                                          "base64"
                                                                                                        ]
                                                                                                      },
                                                                                                      "media_type": {
                                                                                                        "type": "string"
                                                                                                      },
                                                                                                      "data": {
                                                                                                        "type": "string"
                                                                                                      }
                                                                                                    },
                                                                                                    "required": [
                                                                                                      "type",
                                                                                                      "media_type",
                                                                                                      "data"
                                                                                                    ],
                                                                                                    "additionalProperties": false
                                                                                                  },
                                                                                                  {
                                                                                                    "type": "object",
                                                                                                    "properties": {
                                                                                                      "type": {
                                                                                                        "type": "string",
                                                                                                        "enum": [
                                                                                                          "url"
                                                                                                        ]
                                                                                                      },
                                                                                                      "url": {
                                                                                                        "type": "string"
                                                                                                      }
                                                                                                    },
                                                                                                    "required": [
                                                                                                      "type",
                                                                                                      "url"
                                                                                                    ],
                                                                                                    "additionalProperties": false
                                                                                                  }
                                                                                                ]
                                                                                              },
                                                                                              "cache_control": {
                                                                                                "nullable": true
                                                                                              }
                                                                                            },
                                                                                            "required": [
                                                                                              "type",
                                                                                              "source"
                                                                                            ],
                                                                                            "additionalProperties": false
                                                                                          }
                                                                                        ]
                                                                                      }
                                                                                    }
                                                                                  ]
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "content"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        "title": {
                                                                          "nullable": true,
                                                                          "type": "string"
                                                                        },
                                                                        "context": {
                                                                          "nullable": true,
                                                                          "type": "string"
                                                                        },
                                                                        "citations": {
                                                                          "nullable": true,
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "enabled": {
                                                                              "type": "boolean"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "enabled"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        "cache_control": {
                                                                          "nullable": true
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "type",
                                                                        "source"
                                                                      ],
                                                                      "additionalProperties": false,
                                                                      "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            ]
                                                          },
                                                          "is_error": {
                                                            "type": "boolean"
                                                          }
                                                        },
                                                        "required": [
                                                          "tool_use_id",
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "search_result",
                                                              "server_tool_use",
                                                              "web_search_tool_result",
                                                              "web_fetch_tool_result",
                                                              "code_execution_tool_result",
                                                              "bash_code_execution_tool_result",
                                                              "text_editor_code_execution_tool_result",
                                                              "tool_search_tool_result",
                                                              "container_upload"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": {}
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            },
                                            "role": {
                                              "type": "string",
                                              "enum": [
                                                "user",
                                                "assistant",
                                                "system"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "content",
                                            "role"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "max_tokens": {
                                        "type": "number"
                                      },
                                      "container": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "context_management": {
                                        "nullable": true,
                                        "type": "object",
                                        "properties": {},
                                        "additionalProperties": false
                                      },
                                      "mcp_servers": {
                                        "type": "array",
                                        "items": {}
                                      },
                                      "metadata": {
                                        "type": "object",
                                        "properties": {
                                          "user_id": {
                                            "nullable": true,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "user_id"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "output_config": {
                                        "type": "object",
                                        "properties": {
                                          "effort": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "format": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "json_schema"
                                                ]
                                              },
                                              "schema": {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "schema"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "service_tier": {},
                                      "speed": {
                                        "type": "string",
                                        "enum": [
                                          "fast",
                                          "standard"
                                        ]
                                      },
                                      "stop_sequences": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "stream": {
                                        "type": "boolean"
                                      },
                                      "system": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "text"
                                                ]
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "cache_control": {
                                                "nullable": true
                                              },
                                              "citations": {
                                                "nullable": true,
                                                "type": "array",
                                                "items": {}
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text"
                                                  ]
                                                },
                                                "text": {
                                                  "type": "string"
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                },
                                                "citations": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {}
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        ]
                                      },
                                      "temperature": {
                                        "type": "number"
                                      },
                                      "thinking": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "enabled"
                                                ]
                                              },
                                              "budget_tokens": {
                                                "type": "number"
                                              },
                                              "display": {
                                                "nullable": true,
                                                "type": "string",
                                                "enum": [
                                                  "summarized",
                                                  "omitted"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "budget_tokens"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "disabled"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "adaptive"
                                                ]
                                              },
                                              "display": {
                                                "nullable": true,
                                                "type": "string",
                                                "enum": [
                                                  "summarized",
                                                  "omitted"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      "tool_choice": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "auto"
                                                ]
                                              },
                                              "disable_parallel_tool_use": {
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "any"
                                                ]
                                              },
                                              "disable_parallel_tool_use": {
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "tool"
                                                ]
                                              },
                                              "name": {
                                                "type": "string"
                                              },
                                              "disable_parallel_tool_use": {
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "none"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "nullable": true,
                                                  "type": "string",
                                                  "enum": [
                                                    "custom"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                },
                                                "input_schema": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "description": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "input_schema"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bash"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bash_20250124"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "str_replace_editor"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text_editor_20250124"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "str_replace_based_edit_tool"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text_editor_20250429"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "str_replace_based_edit_tool"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text_editor_20250728"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                },
                                                "max_characters": {
                                                  "nullable": true,
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "web_search"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "web_search_20250305"
                                                  ]
                                                },
                                                "allowed_domains": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                "blocked_domains": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                },
                                                "max_uses": {
                                                  "nullable": true,
                                                  "type": "number"
                                                },
                                                "user_location": {
                                                  "nullable": true
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      },
                                      "top_k": {
                                        "type": "number"
                                      },
                                      "top_p": {
                                        "type": "number"
                                      },
                                      "anthropic_version": {
                                        "type": "string"
                                      },
                                      "anthropic_beta": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "_isStreaming": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "messages",
                                      "max_tokens"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "content": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "text": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          },
                                                          "citations": {
                                                            "nullable": true,
                                                            "type": "array",
                                                            "items": {}
                                                          }
                                                        },
                                                        "required": [
                                                          "text",
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "image"
                                                            ]
                                                          },
                                                          "source": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "base64"
                                                                    ]
                                                                  },
                                                                  "media_type": {
                                                                    "type": "string"
                                                                  },
                                                                  "data": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "media_type",
                                                                  "data"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "url"
                                                                    ]
                                                                  },
                                                                  "url": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "source"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "document"
                                                            ]
                                                          },
                                                          "source": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "base64"
                                                                    ]
                                                                  },
                                                                  "media_type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "application/pdf"
                                                                    ]
                                                                  },
                                                                  "data": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "media_type",
                                                                  "data"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "text"
                                                                    ]
                                                                  },
                                                                  "media_type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "text/plain"
                                                                    ]
                                                                  },
                                                                  "data": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "media_type",
                                                                  "data"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "url"
                                                                    ]
                                                                  },
                                                                  "url": {
                                                                    "type": "string",
                                                                    "format": "uri"
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "content"
                                                                    ]
                                                                  },
                                                                  "content": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "string"
                                                                      },
                                                                      {
                                                                        "type": "array",
                                                                        "items": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "text": {
                                                                                  "type": "string"
                                                                                },
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "text"
                                                                                  ]
                                                                                },
                                                                                "cache_control": {
                                                                                  "nullable": true
                                                                                },
                                                                                "citations": {
                                                                                  "nullable": true,
                                                                                  "type": "array",
                                                                                  "items": {}
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "text",
                                                                                "type"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "image"
                                                                                  ]
                                                                                },
                                                                                "source": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "object",
                                                                                      "properties": {
                                                                                        "type": {
                                                                                          "type": "string",
                                                                                          "enum": [
                                                                                            "base64"
                                                                                          ]
                                                                                        },
                                                                                        "media_type": {
                                                                                          "type": "string"
                                                                                        },
                                                                                        "data": {
                                                                                          "type": "string"
                                                                                        }
                                                                                      },
                                                                                      "required": [
                                                                                        "type",
                                                                                        "media_type",
                                                                                        "data"
                                                                                      ],
                                                                                      "additionalProperties": false
                                                                                    },
                                                                                    {
                                                                                      "type": "object",
                                                                                      "properties": {
                                                                                        "type": {
                                                                                          "type": "string",
                                                                                          "enum": [
                                                                                            "url"
                                                                                          ]
                                                                                        },
                                                                                        "url": {
                                                                                          "type": "string"
                                                                                        }
                                                                                      },
                                                                                      "required": [
                                                                                        "type",
                                                                                        "url"
                                                                                      ],
                                                                                      "additionalProperties": false
                                                                                    }
                                                                                  ]
                                                                                },
                                                                                "cache_control": {
                                                                                  "nullable": true
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "source"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        }
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "content"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            ]
                                                          },
                                                          "title": {
                                                            "nullable": true,
                                                            "type": "string"
                                                          },
                                                          "context": {
                                                            "nullable": true,
                                                            "type": "string"
                                                          },
                                                          "citations": {
                                                            "nullable": true,
                                                            "type": "object",
                                                            "properties": {
                                                              "enabled": {
                                                                "type": "boolean"
                                                              }
                                                            },
                                                            "required": [
                                                              "enabled"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "source"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "thinking"
                                                            ]
                                                          },
                                                          "thinking": {
                                                            "type": "string"
                                                          },
                                                          "signature": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "thinking",
                                                          "signature"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "redacted_thinking"
                                                            ]
                                                          },
                                                          "data": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "data"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "input": {},
                                                          "name": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "tool_use"
                                                            ]
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "input",
                                                          "name",
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "tool_use_id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "tool_result"
                                                            ]
                                                          },
                                                          "cache_control": {
                                                            "nullable": true
                                                          },
                                                          "content": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "text": {
                                                                          "type": "string"
                                                                        },
                                                                        "type": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "text"
                                                                          ]
                                                                        },
                                                                        "cache_control": {
                                                                          "nullable": true
                                                                        },
                                                                        "citations": {
                                                                          "nullable": true,
                                                                          "type": "array",
                                                                          "items": {}
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "text",
                                                                        "type"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "type": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "image"
                                                                          ]
                                                                        },
                                                                        "source": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "base64"
                                                                                  ]
                                                                                },
                                                                                "media_type": {
                                                                                  "type": "string"
                                                                                },
                                                                                "data": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "media_type",
                                                                                "data"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "url"
                                                                                  ]
                                                                                },
                                                                                "url": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "url"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        "cache_control": {
                                                                          "nullable": true
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "type",
                                                                        "source"
                                                                      ],
                                                                      "additionalProperties": false
                                                                    },
                                                                    {
                                                                      "type": "object",
                                                                      "properties": {
                                                                        "type": {
                                                                          "type": "string",
                                                                          "enum": [
                                                                            "document"
                                                                          ]
                                                                        },
                                                                        "source": {
                                                                          "anyOf": [
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "base64"
                                                                                  ]
                                                                                },
                                                                                "media_type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "application/pdf"
                                                                                  ]
                                                                                },
                                                                                "data": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "media_type",
                                                                                "data"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "text"
                                                                                  ]
                                                                                },
                                                                                "media_type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "text/plain"
                                                                                  ]
                                                                                },
                                                                                "data": {
                                                                                  "type": "string"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "media_type",
                                                                                "data"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "url"
                                                                                  ]
                                                                                },
                                                                                "url": {
                                                                                  "type": "string",
                                                                                  "format": "uri"
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "url"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            },
                                                                            {
                                                                              "type": "object",
                                                                              "properties": {
                                                                                "type": {
                                                                                  "type": "string",
                                                                                  "enum": [
                                                                                    "content"
                                                                                  ]
                                                                                },
                                                                                "content": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "string"
                                                                                    },
                                                                                    {
                                                                                      "type": "array",
                                                                                      "items": {
                                                                                        "anyOf": [
                                                                                          {
                                                                                            "type": "object",
                                                                                            "properties": {
                                                                                              "text": {
                                                                                                "type": "string"
                                                                                              },
                                                                                              "type": {
                                                                                                "type": "string",
                                                                                                "enum": [
                                                                                                  "text"
                                                                                                ]
                                                                                              },
                                                                                              "cache_control": {
                                                                                                "nullable": true
                                                                                              },
                                                                                              "citations": {
                                                                                                "nullable": true,
                                                                                                "type": "array",
                                                                                                "items": {}
                                                                                              }
                                                                                            },
                                                                                            "required": [
                                                                                              "text",
                                                                                              "type"
                                                                                            ],
                                                                                            "additionalProperties": false
                                                                                          },
                                                                                          {
                                                                                            "type": "object",
                                                                                            "properties": {
                                                                                              "type": {
                                                                                                "type": "string",
                                                                                                "enum": [
                                                                                                  "image"
                                                                                                ]
                                                                                              },
                                                                                              "source": {
                                                                                                "anyOf": [
                                                                                                  {
                                                                                                    "type": "object",
                                                                                                    "properties": {
                                                                                                      "type": {
                                                                                                        "type": "string",
                                                                                                        "enum": [
                                                                                                          "base64"
                                                                                                        ]
                                                                                                      },
                                                                                                      "media_type": {
                                                                                                        "type": "string"
                                                                                                      },
                                                                                                      "data": {
                                                                                                        "type": "string"
                                                                                                      }
                                                                                                    },
                                                                                                    "required": [
                                                                                                      "type",
                                                                                                      "media_type",
                                                                                                      "data"
                                                                                                    ],
                                                                                                    "additionalProperties": false
                                                                                                  },
                                                                                                  {
                                                                                                    "type": "object",
                                                                                                    "properties": {
                                                                                                      "type": {
                                                                                                        "type": "string",
                                                                                                        "enum": [
                                                                                                          "url"
                                                                                                        ]
                                                                                                      },
                                                                                                      "url": {
                                                                                                        "type": "string"
                                                                                                      }
                                                                                                    },
                                                                                                    "required": [
                                                                                                      "type",
                                                                                                      "url"
                                                                                                    ],
                                                                                                    "additionalProperties": false
                                                                                                  }
                                                                                                ]
                                                                                              },
                                                                                              "cache_control": {
                                                                                                "nullable": true
                                                                                              }
                                                                                            },
                                                                                            "required": [
                                                                                              "type",
                                                                                              "source"
                                                                                            ],
                                                                                            "additionalProperties": false
                                                                                          }
                                                                                        ]
                                                                                      }
                                                                                    }
                                                                                  ]
                                                                                }
                                                                              },
                                                                              "required": [
                                                                                "type",
                                                                                "content"
                                                                              ],
                                                                              "additionalProperties": false
                                                                            }
                                                                          ]
                                                                        },
                                                                        "title": {
                                                                          "nullable": true,
                                                                          "type": "string"
                                                                        },
                                                                        "context": {
                                                                          "nullable": true,
                                                                          "type": "string"
                                                                        },
                                                                        "citations": {
                                                                          "nullable": true,
                                                                          "type": "object",
                                                                          "properties": {
                                                                            "enabled": {
                                                                              "type": "boolean"
                                                                            }
                                                                          },
                                                                          "required": [
                                                                            "enabled"
                                                                          ],
                                                                          "additionalProperties": false
                                                                        },
                                                                        "cache_control": {
                                                                          "nullable": true
                                                                        }
                                                                      },
                                                                      "required": [
                                                                        "type",
                                                                        "source"
                                                                      ],
                                                                      "additionalProperties": false,
                                                                      "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            ]
                                                          },
                                                          "is_error": {
                                                            "type": "boolean"
                                                          }
                                                        },
                                                        "required": [
                                                          "tool_use_id",
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "search_result",
                                                              "server_tool_use",
                                                              "web_search_tool_result",
                                                              "web_fetch_tool_result",
                                                              "code_execution_tool_result",
                                                              "bash_code_execution_tool_result",
                                                              "text_editor_code_execution_tool_result",
                                                              "tool_search_tool_result",
                                                              "container_upload"
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": {}
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": {}
                                                      }
                                                    ]
                                                  }
                                                }
                                              ]
                                            },
                                            "role": {
                                              "type": "string",
                                              "enum": [
                                                "user",
                                                "assistant",
                                                "system"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "content",
                                            "role"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "max_tokens": {
                                        "type": "number"
                                      },
                                      "container": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "context_management": {
                                        "nullable": true,
                                        "type": "object",
                                        "properties": {},
                                        "additionalProperties": false
                                      },
                                      "mcp_servers": {
                                        "type": "array",
                                        "items": {}
                                      },
                                      "metadata": {
                                        "type": "object",
                                        "properties": {
                                          "user_id": {
                                            "nullable": true,
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "user_id"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "output_config": {
                                        "type": "object",
                                        "properties": {
                                          "effort": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "format": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "json_schema"
                                                ]
                                              },
                                              "schema": {
                                                "type": "object",
                                                "additionalProperties": {}
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "schema"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "additionalProperties": false
                                      },
                                      "service_tier": {},
                                      "speed": {
                                        "type": "string",
                                        "enum": [
                                          "fast",
                                          "standard"
                                        ]
                                      },
                                      "stop_sequences": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "stream": {
                                        "type": "boolean"
                                      },
                                      "system": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "text"
                                                ]
                                              },
                                              "text": {
                                                "type": "string"
                                              },
                                              "cache_control": {
                                                "nullable": true
                                              },
                                              "citations": {
                                                "nullable": true,
                                                "type": "array",
                                                "items": {}
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "text"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text"
                                                  ]
                                                },
                                                "text": {
                                                  "type": "string"
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                },
                                                "citations": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {}
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            }
                                          }
                                        ]
                                      },
                                      "temperature": {
                                        "type": "number"
                                      },
                                      "thinking": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "enabled"
                                                ]
                                              },
                                              "budget_tokens": {
                                                "type": "number"
                                              },
                                              "display": {
                                                "nullable": true,
                                                "type": "string",
                                                "enum": [
                                                  "summarized",
                                                  "omitted"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "budget_tokens"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "disabled"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "adaptive"
                                                ]
                                              },
                                              "display": {
                                                "nullable": true,
                                                "type": "string",
                                                "enum": [
                                                  "summarized",
                                                  "omitted"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      "tool_choice": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "auto"
                                                ]
                                              },
                                              "disable_parallel_tool_use": {
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "any"
                                                ]
                                              },
                                              "disable_parallel_tool_use": {
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "tool"
                                                ]
                                              },
                                              "name": {
                                                "type": "string"
                                              },
                                              "disable_parallel_tool_use": {
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "none"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          }
                                        ]
                                      },
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "nullable": true,
                                                  "type": "string",
                                                  "enum": [
                                                    "custom"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                },
                                                "input_schema": {
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "description": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "input_schema"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bash"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bash_20250124"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "str_replace_editor"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text_editor_20250124"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "str_replace_based_edit_tool"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text_editor_20250429"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "str_replace_based_edit_tool"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "text_editor_20250728"
                                                  ]
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                },
                                                "max_characters": {
                                                  "nullable": true,
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "enum": [
                                                    "web_search"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "web_search_20250305"
                                                  ]
                                                },
                                                "allowed_domains": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                "blocked_domains": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                "cache_control": {
                                                  "nullable": true
                                                },
                                                "max_uses": {
                                                  "nullable": true,
                                                  "type": "number"
                                                },
                                                "user_location": {
                                                  "nullable": true
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      },
                                      "top_k": {
                                        "type": "number"
                                      },
                                      "top_p": {
                                        "type": "number"
                                      },
                                      "anthropic_version": {
                                        "type": "string"
                                      },
                                      "anthropic_beta": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "_isStreaming": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "messages",
                                      "max_tokens"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/AnthropicMessagesResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "bedrock:invoke"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/CerebrasChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "cerebras:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/MistralChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "mistral:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PerplexityChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PerplexityChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PerplexityChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "perplexity:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/GroqChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "groq:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "xai:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OpenrouterChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OpenrouterChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OpenrouterChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "openrouter:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/VllmChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/VllmChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/VllmChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "vllm:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OllamaChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OllamaChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OllamaChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "ollama:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OllamaNativeChatRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OllamaNativeChatRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/OllamaNativeChatResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "ollama-native:chat"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/CohereChatRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/CohereChatRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/CohereChatResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "cohere:chat"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/ZhipuaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/ZhipuaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/ZhipuaiChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "zhipuai:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/DeepSeekChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/DeepSeekChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/DeepSeekChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "deepseek:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "developer"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "system"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "input_audio"
                                                                ]
                                                              },
                                                              "input_audio": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "wav",
                                                                      "mp3"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data",
                                                                  "format"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "input_audio"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "file"
                                                                ]
                                                              },
                                                              "file": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "file"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                          }
                                                        ],
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "user"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "audio": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tool"
                                                  ]
                                                },
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          }
                                                        ]
                                                      }
                                                    }
                                                  ]
                                                },
                                                "tool_call_id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "tool_call_id"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "name"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                            }
                                          ],
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                        }
                                      },
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "function": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "type": "string"
                                                    },
                                                    "parameters": {
                                                      "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    },
                                                    "strict": {
                                                      "nullable": true,
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "function"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "custom"
                                                  ]
                                                },
                                                "custom": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string",
                                                      "description": "The name of the custom tool, used to identify it in tool calls"
                                                    },
                                                    "description": {
                                                      "description": "Optional description of the custom tool, used to provide more context",
                                                      "type": "string"
                                                    },
                                                    "format": {
                                                      "description": "The input format for the custom tool. Default is unconstrained text.",
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ],
                                                              "description": "Unconstrained text format. Always `text`"
                                                            }
                                                          },
                                                          "required": [
                                                            "type"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "Unconstrained free-form text"
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "grammar"
                                                              ]
                                                            },
                                                            "grammar": {
                                                              "type": "object",
                                                              "properties": {
                                                                "definition": {
                                                                  "type": "string",
                                                                  "description": "The grammar definition"
                                                                },
                                                                "syntax": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "lark",
                                                                    "regex"
                                                                  ],
                                                                  "description": "The syntax of the grammar definition"
                                                                }
                                                              },
                                                              "required": [
                                                                "definition",
                                                                "syntax"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": "Your chosen grammar"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "grammar"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "custom"
                                              ],
                                              "additionalProperties": false,
                                              "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                            }
                                          ],
                                          "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                        }
                                      },
                                      "tool_choice": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "none",
                                              "auto",
                                              "required"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "allowed_tools"
                                                ]
                                              },
                                              "allowed_tools": {
                                                "type": "object",
                                                "properties": {
                                                  "mode": {
                                                    "type": "string",
                                                    "enum": [
                                                      "auto",
                                                      "required"
                                                    ],
                                                    "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                                  },
                                                  "tools": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "name": {
                                                                "type": "string"
                                                              },
                                                              "description": {
                                                                "type": "string"
                                                              },
                                                              "parameters": {
                                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              },
                                                              "strict": {
                                                                "nullable": true,
                                                                "type": "boolean"
                                                              }
                                                            },
                                                            "required": [
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                      }
                                                    },
                                                    "description": "A list of tool definitions that the model should be allowed to call"
                                                  }
                                                },
                                                "required": [
                                                  "mode",
                                                  "tools"
                                                ],
                                                "additionalProperties": false,
                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "allowed_tools"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "function"
                                                ]
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "function"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "custom"
                                                ]
                                              },
                                              "custom": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "description": "The name of the custom tool, used to identify it in tool calls"
                                                  },
                                                  "description": {
                                                    "description": "Optional description of the custom tool, used to provide more context",
                                                    "type": "string"
                                                  },
                                                  "format": {
                                                    "description": "The input format for the custom tool. Default is unconstrained text.",
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ],
                                                            "description": "Unconstrained text format. Always `text`"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Unconstrained free-form text"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grammar"
                                                            ]
                                                          },
                                                          "grammar": {
                                                            "type": "object",
                                                            "properties": {
                                                              "definition": {
                                                                "type": "string",
                                                                "description": "The grammar definition"
                                                              },
                                                              "syntax": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "lark",
                                                                  "regex"
                                                                ],
                                                                "description": "The syntax of the grammar definition"
                                                              }
                                                            },
                                                            "required": [
                                                              "definition",
                                                              "syntax"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "Your chosen grammar"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "grammar"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "custom"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                          }
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_completion_tokens": {
                                        "nullable": true,
                                        "type": "integer",
                                        "exclusiveMinimum": true,
                                        "maximum": 9007199254740991
                                      },
                                      "reasoning_effort": {
                                        "nullable": true,
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "minimal",
                                          "low",
                                          "medium",
                                          "high",
                                          "xhigh"
                                        ]
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "messages"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "developer"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "system"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "input_audio"
                                                                ]
                                                              },
                                                              "input_audio": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "wav",
                                                                      "mp3"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data",
                                                                  "format"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "input_audio"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "file"
                                                                ]
                                                              },
                                                              "file": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "file"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                          }
                                                        ],
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "user"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "audio": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tool"
                                                  ]
                                                },
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          }
                                                        ]
                                                      }
                                                    }
                                                  ]
                                                },
                                                "tool_call_id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "tool_call_id"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "name"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                            }
                                          ],
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                        }
                                      },
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "function": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "type": "string"
                                                    },
                                                    "parameters": {
                                                      "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    },
                                                    "strict": {
                                                      "nullable": true,
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "function"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "custom"
                                                  ]
                                                },
                                                "custom": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string",
                                                      "description": "The name of the custom tool, used to identify it in tool calls"
                                                    },
                                                    "description": {
                                                      "description": "Optional description of the custom tool, used to provide more context",
                                                      "type": "string"
                                                    },
                                                    "format": {
                                                      "description": "The input format for the custom tool. Default is unconstrained text.",
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ],
                                                              "description": "Unconstrained text format. Always `text`"
                                                            }
                                                          },
                                                          "required": [
                                                            "type"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "Unconstrained free-form text"
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "grammar"
                                                              ]
                                                            },
                                                            "grammar": {
                                                              "type": "object",
                                                              "properties": {
                                                                "definition": {
                                                                  "type": "string",
                                                                  "description": "The grammar definition"
                                                                },
                                                                "syntax": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "lark",
                                                                    "regex"
                                                                  ],
                                                                  "description": "The syntax of the grammar definition"
                                                                }
                                                              },
                                                              "required": [
                                                                "definition",
                                                                "syntax"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": "Your chosen grammar"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "grammar"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "custom"
                                              ],
                                              "additionalProperties": false,
                                              "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                            }
                                          ],
                                          "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                        }
                                      },
                                      "tool_choice": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "none",
                                              "auto",
                                              "required"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "allowed_tools"
                                                ]
                                              },
                                              "allowed_tools": {
                                                "type": "object",
                                                "properties": {
                                                  "mode": {
                                                    "type": "string",
                                                    "enum": [
                                                      "auto",
                                                      "required"
                                                    ],
                                                    "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                                  },
                                                  "tools": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "name": {
                                                                "type": "string"
                                                              },
                                                              "description": {
                                                                "type": "string"
                                                              },
                                                              "parameters": {
                                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              },
                                                              "strict": {
                                                                "nullable": true,
                                                                "type": "boolean"
                                                              }
                                                            },
                                                            "required": [
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                      }
                                                    },
                                                    "description": "A list of tool definitions that the model should be allowed to call"
                                                  }
                                                },
                                                "required": [
                                                  "mode",
                                                  "tools"
                                                ],
                                                "additionalProperties": false,
                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "allowed_tools"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "function"
                                                ]
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "function"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "custom"
                                                ]
                                              },
                                              "custom": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "description": "The name of the custom tool, used to identify it in tool calls"
                                                  },
                                                  "description": {
                                                    "description": "Optional description of the custom tool, used to provide more context",
                                                    "type": "string"
                                                  },
                                                  "format": {
                                                    "description": "The input format for the custom tool. Default is unconstrained text.",
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ],
                                                            "description": "Unconstrained text format. Always `text`"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Unconstrained free-form text"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grammar"
                                                            ]
                                                          },
                                                          "grammar": {
                                                            "type": "object",
                                                            "properties": {
                                                              "definition": {
                                                                "type": "string",
                                                                "description": "The grammar definition"
                                                              },
                                                              "syntax": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "lark",
                                                                  "regex"
                                                                ],
                                                                "description": "The syntax of the grammar definition"
                                                              }
                                                            },
                                                            "required": [
                                                              "definition",
                                                              "syntax"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "Your chosen grammar"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "grammar"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "custom"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                          }
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_completion_tokens": {
                                        "nullable": true,
                                        "type": "integer",
                                        "exclusiveMinimum": true,
                                        "maximum": 9007199254740991
                                      },
                                      "reasoning_effort": {
                                        "nullable": true,
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "minimal",
                                          "low",
                                          "medium",
                                          "high",
                                          "xhigh"
                                        ]
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "messages"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "choices": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "finish_reason": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "stop",
                                                    "length",
                                                    "tool_calls",
                                                    "content_filter",
                                                    "function_call"
                                                  ]
                                                },
                                                {
                                                  "type": "string"
                                                }
                                              ]
                                            },
                                            "index": {
                                              "type": "number"
                                            },
                                            "logprobs": {
                                              "nullable": true
                                            },
                                            "message": {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "annotations": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {}
                                                },
                                                "audio": {
                                                  "nullable": true
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                                            }
                                          },
                                          "required": [
                                            "finish_reason",
                                            "logprobs",
                                            "message"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                                        }
                                      },
                                      "created": {
                                        "type": "number"
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "chat.completion"
                                        ]
                                      },
                                      "server_tier": {
                                        "type": "string"
                                      },
                                      "system_fingerprint": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "completion_tokens": {
                                            "type": "number"
                                          },
                                          "prompt_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          },
                                          "completion_tokens_details": {
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                                          },
                                          "prompt_tokens_details": {
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                                          }
                                        },
                                        "required": [
                                          "completion_tokens",
                                          "prompt_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "choices",
                                      "created",
                                      "model",
                                      "object"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "kimi:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "developer"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "system"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "input_audio"
                                                                ]
                                                              },
                                                              "input_audio": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "wav",
                                                                      "mp3"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data",
                                                                  "format"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "input_audio"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "file"
                                                                ]
                                                              },
                                                              "file": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "file"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                          }
                                                        ],
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "user"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "audio": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tool"
                                                  ]
                                                },
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          }
                                                        ]
                                                      }
                                                    }
                                                  ]
                                                },
                                                "tool_call_id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "tool_call_id"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "name"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                            }
                                          ],
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                        }
                                      },
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "function": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "type": "string"
                                                    },
                                                    "parameters": {
                                                      "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    },
                                                    "strict": {
                                                      "nullable": true,
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "function"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "custom"
                                                  ]
                                                },
                                                "custom": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string",
                                                      "description": "The name of the custom tool, used to identify it in tool calls"
                                                    },
                                                    "description": {
                                                      "description": "Optional description of the custom tool, used to provide more context",
                                                      "type": "string"
                                                    },
                                                    "format": {
                                                      "description": "The input format for the custom tool. Default is unconstrained text.",
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ],
                                                              "description": "Unconstrained text format. Always `text`"
                                                            }
                                                          },
                                                          "required": [
                                                            "type"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "Unconstrained free-form text"
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "grammar"
                                                              ]
                                                            },
                                                            "grammar": {
                                                              "type": "object",
                                                              "properties": {
                                                                "definition": {
                                                                  "type": "string",
                                                                  "description": "The grammar definition"
                                                                },
                                                                "syntax": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "lark",
                                                                    "regex"
                                                                  ],
                                                                  "description": "The syntax of the grammar definition"
                                                                }
                                                              },
                                                              "required": [
                                                                "definition",
                                                                "syntax"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": "Your chosen grammar"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "grammar"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "custom"
                                              ],
                                              "additionalProperties": false,
                                              "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                            }
                                          ],
                                          "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                        }
                                      },
                                      "tool_choice": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "none",
                                              "auto",
                                              "required"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "allowed_tools"
                                                ]
                                              },
                                              "allowed_tools": {
                                                "type": "object",
                                                "properties": {
                                                  "mode": {
                                                    "type": "string",
                                                    "enum": [
                                                      "auto",
                                                      "required"
                                                    ],
                                                    "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                                  },
                                                  "tools": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "name": {
                                                                "type": "string"
                                                              },
                                                              "description": {
                                                                "type": "string"
                                                              },
                                                              "parameters": {
                                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              },
                                                              "strict": {
                                                                "nullable": true,
                                                                "type": "boolean"
                                                              }
                                                            },
                                                            "required": [
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                      }
                                                    },
                                                    "description": "A list of tool definitions that the model should be allowed to call"
                                                  }
                                                },
                                                "required": [
                                                  "mode",
                                                  "tools"
                                                ],
                                                "additionalProperties": false,
                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "allowed_tools"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "function"
                                                ]
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "function"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "custom"
                                                ]
                                              },
                                              "custom": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "description": "The name of the custom tool, used to identify it in tool calls"
                                                  },
                                                  "description": {
                                                    "description": "Optional description of the custom tool, used to provide more context",
                                                    "type": "string"
                                                  },
                                                  "format": {
                                                    "description": "The input format for the custom tool. Default is unconstrained text.",
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ],
                                                            "description": "Unconstrained text format. Always `text`"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Unconstrained free-form text"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grammar"
                                                            ]
                                                          },
                                                          "grammar": {
                                                            "type": "object",
                                                            "properties": {
                                                              "definition": {
                                                                "type": "string",
                                                                "description": "The grammar definition"
                                                              },
                                                              "syntax": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "lark",
                                                                  "regex"
                                                                ],
                                                                "description": "The syntax of the grammar definition"
                                                              }
                                                            },
                                                            "required": [
                                                              "definition",
                                                              "syntax"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "Your chosen grammar"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "grammar"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "custom"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                          }
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_completion_tokens": {
                                        "nullable": true,
                                        "type": "integer",
                                        "exclusiveMinimum": true,
                                        "maximum": 9007199254740991
                                      },
                                      "reasoning_effort": {
                                        "nullable": true,
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "minimal",
                                          "low",
                                          "medium",
                                          "high",
                                          "xhigh"
                                        ]
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "messages"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "developer"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "system"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "input_audio"
                                                                ]
                                                              },
                                                              "input_audio": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "wav",
                                                                      "mp3"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data",
                                                                  "format"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "input_audio"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "file"
                                                                ]
                                                              },
                                                              "file": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "file"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                          }
                                                        ],
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "user"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "audio": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tool"
                                                  ]
                                                },
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          }
                                                        ]
                                                      }
                                                    }
                                                  ]
                                                },
                                                "tool_call_id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "tool_call_id"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "name"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                            }
                                          ],
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                        }
                                      },
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "function": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "type": "string"
                                                    },
                                                    "parameters": {
                                                      "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    },
                                                    "strict": {
                                                      "nullable": true,
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "function"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "custom"
                                                  ]
                                                },
                                                "custom": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string",
                                                      "description": "The name of the custom tool, used to identify it in tool calls"
                                                    },
                                                    "description": {
                                                      "description": "Optional description of the custom tool, used to provide more context",
                                                      "type": "string"
                                                    },
                                                    "format": {
                                                      "description": "The input format for the custom tool. Default is unconstrained text.",
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ],
                                                              "description": "Unconstrained text format. Always `text`"
                                                            }
                                                          },
                                                          "required": [
                                                            "type"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "Unconstrained free-form text"
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "grammar"
                                                              ]
                                                            },
                                                            "grammar": {
                                                              "type": "object",
                                                              "properties": {
                                                                "definition": {
                                                                  "type": "string",
                                                                  "description": "The grammar definition"
                                                                },
                                                                "syntax": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "lark",
                                                                    "regex"
                                                                  ],
                                                                  "description": "The syntax of the grammar definition"
                                                                }
                                                              },
                                                              "required": [
                                                                "definition",
                                                                "syntax"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": "Your chosen grammar"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "grammar"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "custom"
                                              ],
                                              "additionalProperties": false,
                                              "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                            }
                                          ],
                                          "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                        }
                                      },
                                      "tool_choice": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "none",
                                              "auto",
                                              "required"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "allowed_tools"
                                                ]
                                              },
                                              "allowed_tools": {
                                                "type": "object",
                                                "properties": {
                                                  "mode": {
                                                    "type": "string",
                                                    "enum": [
                                                      "auto",
                                                      "required"
                                                    ],
                                                    "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                                  },
                                                  "tools": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "name": {
                                                                "type": "string"
                                                              },
                                                              "description": {
                                                                "type": "string"
                                                              },
                                                              "parameters": {
                                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              },
                                                              "strict": {
                                                                "nullable": true,
                                                                "type": "boolean"
                                                              }
                                                            },
                                                            "required": [
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                      }
                                                    },
                                                    "description": "A list of tool definitions that the model should be allowed to call"
                                                  }
                                                },
                                                "required": [
                                                  "mode",
                                                  "tools"
                                                ],
                                                "additionalProperties": false,
                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "allowed_tools"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "function"
                                                ]
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "function"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "custom"
                                                ]
                                              },
                                              "custom": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "description": "The name of the custom tool, used to identify it in tool calls"
                                                  },
                                                  "description": {
                                                    "description": "Optional description of the custom tool, used to provide more context",
                                                    "type": "string"
                                                  },
                                                  "format": {
                                                    "description": "The input format for the custom tool. Default is unconstrained text.",
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ],
                                                            "description": "Unconstrained text format. Always `text`"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Unconstrained free-form text"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grammar"
                                                            ]
                                                          },
                                                          "grammar": {
                                                            "type": "object",
                                                            "properties": {
                                                              "definition": {
                                                                "type": "string",
                                                                "description": "The grammar definition"
                                                              },
                                                              "syntax": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "lark",
                                                                  "regex"
                                                                ],
                                                                "description": "The syntax of the grammar definition"
                                                              }
                                                            },
                                                            "required": [
                                                              "definition",
                                                              "syntax"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "Your chosen grammar"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "grammar"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "custom"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                          }
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_completion_tokens": {
                                        "nullable": true,
                                        "type": "integer",
                                        "exclusiveMinimum": true,
                                        "maximum": 9007199254740991
                                      },
                                      "reasoning_effort": {
                                        "nullable": true,
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "minimal",
                                          "low",
                                          "medium",
                                          "high",
                                          "xhigh"
                                        ]
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "messages"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "choices": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "finish_reason": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "stop",
                                                    "length",
                                                    "tool_calls",
                                                    "content_filter",
                                                    "function_call"
                                                  ]
                                                },
                                                {
                                                  "type": "string"
                                                }
                                              ]
                                            },
                                            "index": {
                                              "type": "number"
                                            },
                                            "logprobs": {
                                              "nullable": true
                                            },
                                            "message": {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "annotations": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {}
                                                },
                                                "audio": {
                                                  "nullable": true
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                                            }
                                          },
                                          "required": [
                                            "finish_reason",
                                            "logprobs",
                                            "message"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                                        }
                                      },
                                      "created": {
                                        "type": "number"
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "object": {
                                        "type": "string"
                                      },
                                      "server_tier": {
                                        "type": "string"
                                      },
                                      "system_fingerprint": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "completion_tokens": {
                                            "type": "number"
                                          },
                                          "prompt_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          },
                                          "completion_tokens_details": {
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                                          },
                                          "prompt_tokens_details": {
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                                          }
                                        },
                                        "required": [
                                          "completion_tokens",
                                          "prompt_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "choices",
                                      "model"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "github-copilot:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "developer"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "system"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "input_audio"
                                                                ]
                                                              },
                                                              "input_audio": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "wav",
                                                                      "mp3"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data",
                                                                  "format"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "input_audio"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "file"
                                                                ]
                                                              },
                                                              "file": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "file"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                          }
                                                        ],
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "user"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "audio": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tool"
                                                  ]
                                                },
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          }
                                                        ]
                                                      }
                                                    }
                                                  ]
                                                },
                                                "tool_call_id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "tool_call_id"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "name"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                            }
                                          ],
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                        }
                                      },
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "function": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "type": "string"
                                                    },
                                                    "parameters": {
                                                      "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    },
                                                    "strict": {
                                                      "nullable": true,
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "function"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "custom"
                                                  ]
                                                },
                                                "custom": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string",
                                                      "description": "The name of the custom tool, used to identify it in tool calls"
                                                    },
                                                    "description": {
                                                      "description": "Optional description of the custom tool, used to provide more context",
                                                      "type": "string"
                                                    },
                                                    "format": {
                                                      "description": "The input format for the custom tool. Default is unconstrained text.",
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ],
                                                              "description": "Unconstrained text format. Always `text`"
                                                            }
                                                          },
                                                          "required": [
                                                            "type"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "Unconstrained free-form text"
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "grammar"
                                                              ]
                                                            },
                                                            "grammar": {
                                                              "type": "object",
                                                              "properties": {
                                                                "definition": {
                                                                  "type": "string",
                                                                  "description": "The grammar definition"
                                                                },
                                                                "syntax": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "lark",
                                                                    "regex"
                                                                  ],
                                                                  "description": "The syntax of the grammar definition"
                                                                }
                                                              },
                                                              "required": [
                                                                "definition",
                                                                "syntax"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": "Your chosen grammar"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "grammar"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "custom"
                                              ],
                                              "additionalProperties": false,
                                              "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                            }
                                          ],
                                          "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                        }
                                      },
                                      "tool_choice": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "none",
                                              "auto",
                                              "required"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "allowed_tools"
                                                ]
                                              },
                                              "allowed_tools": {
                                                "type": "object",
                                                "properties": {
                                                  "mode": {
                                                    "type": "string",
                                                    "enum": [
                                                      "auto",
                                                      "required"
                                                    ],
                                                    "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                                  },
                                                  "tools": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "name": {
                                                                "type": "string"
                                                              },
                                                              "description": {
                                                                "type": "string"
                                                              },
                                                              "parameters": {
                                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              },
                                                              "strict": {
                                                                "nullable": true,
                                                                "type": "boolean"
                                                              }
                                                            },
                                                            "required": [
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                      }
                                                    },
                                                    "description": "A list of tool definitions that the model should be allowed to call"
                                                  }
                                                },
                                                "required": [
                                                  "mode",
                                                  "tools"
                                                ],
                                                "additionalProperties": false,
                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "allowed_tools"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "function"
                                                ]
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "function"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "custom"
                                                ]
                                              },
                                              "custom": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "description": "The name of the custom tool, used to identify it in tool calls"
                                                  },
                                                  "description": {
                                                    "description": "Optional description of the custom tool, used to provide more context",
                                                    "type": "string"
                                                  },
                                                  "format": {
                                                    "description": "The input format for the custom tool. Default is unconstrained text.",
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ],
                                                            "description": "Unconstrained text format. Always `text`"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Unconstrained free-form text"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grammar"
                                                            ]
                                                          },
                                                          "grammar": {
                                                            "type": "object",
                                                            "properties": {
                                                              "definition": {
                                                                "type": "string",
                                                                "description": "The grammar definition"
                                                              },
                                                              "syntax": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "lark",
                                                                  "regex"
                                                                ],
                                                                "description": "The syntax of the grammar definition"
                                                              }
                                                            },
                                                            "required": [
                                                              "definition",
                                                              "syntax"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "Your chosen grammar"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "grammar"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "custom"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                          }
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_completion_tokens": {
                                        "nullable": true,
                                        "type": "integer",
                                        "exclusiveMinimum": true,
                                        "maximum": 9007199254740991
                                      },
                                      "reasoning_effort": {
                                        "nullable": true,
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "minimal",
                                          "low",
                                          "medium",
                                          "high",
                                          "xhigh"
                                        ]
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "messages"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "messages": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "developer"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "system"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "input_audio"
                                                                ]
                                                              },
                                                              "input_audio": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "data": {
                                                                    "type": "string"
                                                                  },
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "wav",
                                                                      "mp3"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "data",
                                                                  "format"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "input_audio"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "file"
                                                                ]
                                                              },
                                                              "file": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "file_data": {
                                                                    "type": "string"
                                                                  },
                                                                  "file_id": {
                                                                    "type": "string"
                                                                  },
                                                                  "filename": {
                                                                    "type": "string"
                                                                  }
                                                                },
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "file"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                          }
                                                        ],
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "user"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "content",
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "audio": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                      }
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                      }
                                                    }
                                                  ]
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tool"
                                                  ]
                                                },
                                                "content": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "text"
                                                                ]
                                                              },
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "text"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "type": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "image_url"
                                                                ]
                                                              },
                                                              "image_url": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "url": {
                                                                    "type": "string"
                                                                  },
                                                                  "detail": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "auto",
                                                                      "low",
                                                                      "high"
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "url"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                              }
                                                            },
                                                            "required": [
                                                              "type",
                                                              "image_url"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                          }
                                                        ]
                                                      }
                                                    }
                                                  ]
                                                },
                                                "tool_call_id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "tool_call_id"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "role",
                                                "content",
                                                "name"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                            }
                                          ],
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                        }
                                      },
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "function": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "description": {
                                                      "type": "string"
                                                    },
                                                    "parameters": {
                                                      "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    },
                                                    "strict": {
                                                      "nullable": true,
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "function"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "custom"
                                                  ]
                                                },
                                                "custom": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string",
                                                      "description": "The name of the custom tool, used to identify it in tool calls"
                                                    },
                                                    "description": {
                                                      "description": "Optional description of the custom tool, used to provide more context",
                                                      "type": "string"
                                                    },
                                                    "format": {
                                                      "description": "The input format for the custom tool. Default is unconstrained text.",
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ],
                                                              "description": "Unconstrained text format. Always `text`"
                                                            }
                                                          },
                                                          "required": [
                                                            "type"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "Unconstrained free-form text"
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "grammar"
                                                              ]
                                                            },
                                                            "grammar": {
                                                              "type": "object",
                                                              "properties": {
                                                                "definition": {
                                                                  "type": "string",
                                                                  "description": "The grammar definition"
                                                                },
                                                                "syntax": {
                                                                  "type": "string",
                                                                  "enum": [
                                                                    "lark",
                                                                    "regex"
                                                                  ],
                                                                  "description": "The syntax of the grammar definition"
                                                                }
                                                              },
                                                              "required": [
                                                                "definition",
                                                                "syntax"
                                                              ],
                                                              "additionalProperties": false,
                                                              "description": "Your chosen grammar"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "grammar"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "custom"
                                              ],
                                              "additionalProperties": false,
                                              "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                            }
                                          ],
                                          "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                        }
                                      },
                                      "tool_choice": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "none",
                                              "auto",
                                              "required"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "allowed_tools"
                                                ]
                                              },
                                              "allowed_tools": {
                                                "type": "object",
                                                "properties": {
                                                  "mode": {
                                                    "type": "string",
                                                    "enum": [
                                                      "auto",
                                                      "required"
                                                    ],
                                                    "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                                  },
                                                  "tools": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "name": {
                                                                "type": "string"
                                                              },
                                                              "description": {
                                                                "type": "string"
                                                              },
                                                              "parameters": {
                                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              },
                                                              "strict": {
                                                                "nullable": true,
                                                                "type": "boolean"
                                                              }
                                                            },
                                                            "required": [
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                      }
                                                    },
                                                    "description": "A list of tool definitions that the model should be allowed to call"
                                                  }
                                                },
                                                "required": [
                                                  "mode",
                                                  "tools"
                                                ],
                                                "additionalProperties": false,
                                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "allowed_tools"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "function"
                                                ]
                                              },
                                              "function": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "function"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "custom"
                                                ]
                                              },
                                              "custom": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "description": "The name of the custom tool, used to identify it in tool calls"
                                                  },
                                                  "description": {
                                                    "description": "Optional description of the custom tool, used to provide more context",
                                                    "type": "string"
                                                  },
                                                  "format": {
                                                    "description": "The input format for the custom tool. Default is unconstrained text.",
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "text"
                                                            ],
                                                            "description": "Unconstrained text format. Always `text`"
                                                          }
                                                        },
                                                        "required": [
                                                          "type"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Unconstrained free-form text"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grammar"
                                                            ]
                                                          },
                                                          "grammar": {
                                                            "type": "object",
                                                            "properties": {
                                                              "definition": {
                                                                "type": "string",
                                                                "description": "The grammar definition"
                                                              },
                                                              "syntax": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "lark",
                                                                  "regex"
                                                                ],
                                                                "description": "The syntax of the grammar definition"
                                                              }
                                                            },
                                                            "required": [
                                                              "definition",
                                                              "syntax"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "Your chosen grammar"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "grammar"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "custom"
                                            ],
                                            "additionalProperties": false,
                                            "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                          }
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "max_completion_tokens": {
                                        "nullable": true,
                                        "type": "integer",
                                        "exclusiveMinimum": true,
                                        "maximum": 9007199254740991
                                      },
                                      "reasoning_effort": {
                                        "nullable": true,
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "minimal",
                                          "low",
                                          "medium",
                                          "high",
                                          "xhigh"
                                        ]
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "model",
                                      "messages"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "choices": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "finish_reason": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "stop",
                                                    "length",
                                                    "tool_calls",
                                                    "content_filter",
                                                    "function_call"
                                                  ]
                                                },
                                                {
                                                  "type": "string"
                                                }
                                              ]
                                            },
                                            "index": {
                                              "type": "number"
                                            },
                                            "logprobs": {
                                              "nullable": true
                                            },
                                            "message": {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "annotations": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {}
                                                },
                                                "audio": {
                                                  "nullable": true
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                                            }
                                          },
                                          "required": [
                                            "finish_reason",
                                            "logprobs",
                                            "message"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                                        }
                                      },
                                      "created": {
                                        "type": "number"
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "chat.completion"
                                        ]
                                      },
                                      "server_tier": {
                                        "type": "string"
                                      },
                                      "system_fingerprint": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "completion_tokens": {
                                            "type": "number"
                                          },
                                          "prompt_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          },
                                          "completion_tokens_details": {
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                                          },
                                          "prompt_tokens_details": {
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                                          }
                                        },
                                        "required": [
                                          "completion_tokens",
                                          "prompt_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "choices",
                                      "created",
                                      "model",
                                      "object"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "microsoft-365-copilot:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/MinimaxChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/MinimaxChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/MinimaxChatCompletionResponse"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "minimax:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/XaiChatCompletionRequest"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "choices": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "finish_reason": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "enum": [
                                                    "stop",
                                                    "length",
                                                    "tool_calls",
                                                    "content_filter",
                                                    "function_call"
                                                  ]
                                                },
                                                {
                                                  "type": "string"
                                                }
                                              ]
                                            },
                                            "index": {
                                              "type": "number"
                                            },
                                            "logprobs": {
                                              "nullable": true
                                            },
                                            "message": {
                                              "type": "object",
                                              "properties": {
                                                "content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "refusal": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "annotations": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {}
                                                },
                                                "audio": {
                                                  "nullable": true
                                                },
                                                "function_call": {
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                                  "nullable": true,
                                                  "type": "object",
                                                  "properties": {
                                                    "arguments": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "arguments",
                                                    "name"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                "reasoning_content": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "tool_calls": {
                                                  "nullable": true,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "function"
                                                            ]
                                                          },
                                                          "function": {
                                                            "type": "object",
                                                            "properties": {
                                                              "arguments": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "arguments",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "function"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "id": {
                                                            "type": "string"
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "custom"
                                                            ]
                                                          },
                                                          "custom": {
                                                            "type": "object",
                                                            "properties": {
                                                              "input": {
                                                                "type": "string"
                                                              },
                                                              "name": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "input",
                                                              "name"
                                                            ],
                                                            "additionalProperties": false,
                                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                          }
                                                        },
                                                        "required": [
                                                          "id",
                                                          "type",
                                                          "custom"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                      }
                                                    ],
                                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "role"
                                              ],
                                              "additionalProperties": false,
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                                            }
                                          },
                                          "required": [
                                            "finish_reason",
                                            "logprobs",
                                            "message"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                                        }
                                      },
                                      "created": {
                                        "type": "number"
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "chat.completion"
                                        ]
                                      },
                                      "server_tier": {
                                        "type": "string"
                                      },
                                      "system_fingerprint": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "completion_tokens": {
                                            "type": "number"
                                          },
                                          "prompt_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          },
                                          "completion_tokens_details": {
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                                          },
                                          "prompt_tokens_details": {
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                                          }
                                        },
                                        "required": [
                                          "completion_tokens",
                                          "prompt_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "choices",
                                      "created",
                                      "model",
                                      "object"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "azure:chatCompletions"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          }
                                        ]
                                      },
                                      "instructions": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "max_output_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "metadata": {
                                        "nullable": true,
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "previous_response_id": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "text": {},
                                      "tool_choice": {},
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "parameters": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "strict": {
                                                  "nullable": true,
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "name"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          ]
                                        }
                                      },
                                      "top_p": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "user": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          }
                                        ]
                                      },
                                      "instructions": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "max_output_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "metadata": {
                                        "nullable": true,
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "previous_response_id": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "text": {},
                                      "tool_choice": {},
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "parameters": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "strict": {
                                                  "nullable": true,
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "name"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          ]
                                        }
                                      },
                                      "top_p": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "user": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "response"
                                        ]
                                      },
                                      "created_at": {
                                        "type": "number"
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "output": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "message"
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "status": {
                                                  "type": "string"
                                                },
                                                "content": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "output_text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": {},
                                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": {},
                                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "role",
                                                "status",
                                                "content"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function_call"
                                                  ]
                                                },
                                                "id": {
                                                  "type": "string"
                                                },
                                                "call_id": {
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "arguments": {
                                                  "type": "string"
                                                },
                                                "status": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "call_id",
                                                "name",
                                                "arguments"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "input_tokens": {
                                            "type": "number"
                                          },
                                          "output_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "input_tokens",
                                          "output_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "object",
                                      "created_at",
                                      "model",
                                      "output",
                                      "status"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "azure:responses"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          }
                                        ]
                                      },
                                      "instructions": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "max_output_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "metadata": {
                                        "nullable": true,
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "previous_response_id": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "text": {},
                                      "tool_choice": {},
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "parameters": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "strict": {
                                                  "nullable": true,
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "name"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          ]
                                        }
                                      },
                                      "top_p": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "user": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          }
                                        ]
                                      },
                                      "instructions": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "max_output_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "metadata": {
                                        "nullable": true,
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "previous_response_id": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "text": {},
                                      "tool_choice": {},
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "parameters": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "strict": {
                                                  "nullable": true,
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "name"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          ]
                                        }
                                      },
                                      "top_p": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "user": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "response"
                                        ]
                                      },
                                      "created_at": {
                                        "type": "number"
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "output": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "message"
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "status": {
                                                  "type": "string"
                                                },
                                                "content": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "output_text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": {},
                                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": {},
                                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "role",
                                                "status",
                                                "content"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function_call"
                                                  ]
                                                },
                                                "id": {
                                                  "type": "string"
                                                },
                                                "call_id": {
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "arguments": {
                                                  "type": "string"
                                                },
                                                "status": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "call_id",
                                                "name",
                                                "arguments"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "input_tokens": {
                                            "type": "number"
                                          },
                                          "output_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "input_tokens",
                                          "output_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "object",
                                      "created_at",
                                      "model",
                                      "output",
                                      "status"
                                    ],
                                    "additionalProperties": {},
                                    "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "perplexity:responses"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "profileId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "externalAgentId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "executionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "userId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "virtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "passthroughVirtualKeyId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "environmentId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "connectorId": {
                                "nullable": true,
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sessionId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "sessionSource": {
                                "nullable": true,
                                "type": "string"
                              },
                              "source": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "api",
                                  "model_router",
                                  "chat",
                                  "chat:compaction",
                                  "a2a:compaction",
                                  "chat:title_generation",
                                  "chat:tool_call_repair",
                                  "a2a:tool_call_repair",
                                  "skill:description_generation",
                                  "guardrail:dual_llm",
                                  "chatops:slack",
                                  "chatops:ms-teams",
                                  "chatops:telegram",
                                  "email",
                                  "schedule-trigger",
                                  "knowledge:embedding",
                                  "knowledge:reranker",
                                  "knowledge:query-expansion",
                                  "knowledge:contextual-retrieval",
                                  "app:llm_complete",
                                  "app:recording_enhancement"
                                ]
                              },
                              "authMethod": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "provider_key",
                                  "virtual_key",
                                  "passthrough_virtual_key",
                                  "jwks",
                                  "oauth_client_credentials",
                                  "oauth_user",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              "billingMode": {
                                "type": "string",
                                "enum": [
                                  "metered",
                                  "subscription"
                                ]
                              },
                              "authenticatedAppId": {
                                "nullable": true,
                                "type": "string"
                              },
                              "authenticatedAppName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "request": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          }
                                        ]
                                      },
                                      "instructions": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "max_output_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "metadata": {
                                        "nullable": true,
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "previous_response_id": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "text": {},
                                      "tool_choice": {},
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "parameters": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "strict": {
                                                  "nullable": true,
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "name"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          ]
                                        }
                                      },
                                      "top_p": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "user": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "processedRequest": {
                                "nullable": true,
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "model": {
                                        "type": "string"
                                      },
                                      "input": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          }
                                        ]
                                      },
                                      "instructions": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "max_output_tokens": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "metadata": {
                                        "nullable": true,
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "string"
                                        }
                                      },
                                      "previous_response_id": {
                                        "nullable": true,
                                        "type": "string"
                                      },
                                      "stream": {
                                        "nullable": true,
                                        "type": "boolean"
                                      },
                                      "temperature": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "text": {},
                                      "tool_choice": {},
                                      "tools": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function"
                                                  ]
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "description": {
                                                  "nullable": true,
                                                  "type": "string"
                                                },
                                                "parameters": {
                                                  "nullable": true,
                                                  "type": "object",
                                                  "additionalProperties": {}
                                                },
                                                "strict": {
                                                  "nullable": true,
                                                  "type": "boolean"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "name"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                            }
                                          ]
                                        }
                                      },
                                      "top_p": {
                                        "nullable": true,
                                        "type": "number"
                                      },
                                      "user": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "model"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                ]
                              },
                              "response": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "object": {
                                        "type": "string"
                                      },
                                      "created_at": {
                                        "type": "number"
                                      },
                                      "model": {
                                        "type": "string"
                                      },
                                      "output": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "message"
                                                  ]
                                                },
                                                "role": {
                                                  "type": "string",
                                                  "enum": [
                                                    "assistant"
                                                  ]
                                                },
                                                "status": {
                                                  "type": "string"
                                                },
                                                "content": {
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "output_text"
                                                            ]
                                                          },
                                                          "text": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "text"
                                                        ],
                                                        "additionalProperties": {},
                                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string",
                                                            "enum": [
                                                              "refusal"
                                                            ]
                                                          },
                                                          "refusal": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "refusal"
                                                        ],
                                                        "additionalProperties": {},
                                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "type",
                                                "role",
                                                "status",
                                                "content"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "function_call"
                                                  ]
                                                },
                                                "id": {
                                                  "type": "string"
                                                },
                                                "call_id": {
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "arguments": {
                                                  "type": "string"
                                                },
                                                "status": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "call_id",
                                                "name",
                                                "arguments"
                                              ],
                                              "additionalProperties": {},
                                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type"
                                              ],
                                              "additionalProperties": {}
                                            }
                                          ]
                                        }
                                      },
                                      "status": {
                                        "type": "string"
                                      },
                                      "usage": {
                                        "type": "object",
                                        "properties": {
                                          "input_tokens": {
                                            "type": "number"
                                          },
                                          "output_tokens": {
                                            "type": "number"
                                          },
                                          "total_tokens": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "input_tokens",
                                          "output_tokens",
                                          "total_tokens"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "model",
                                      "output"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "error": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "error"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__incognitoLocked": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "__incognitoLocked"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "__redacted": {
                                            "type": "string",
                                            "enum": [
                                              "incognito"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "__redacted"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                ]
                              },
                              "dualLlmAnalyses": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "toolCallId": {
                                      "type": "string"
                                    },
                                    "conversations": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user",
                                              "assistant"
                                            ]
                                          },
                                          "content": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content"
                                        ],
                                        "additionalProperties": false,
                                        "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                      }
                                    },
                                    "result": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "toolCallId",
                                    "conversations",
                                    "result"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "unsafeContextBoundary": {
                                "nullable": true,
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "preexisting_untrusted"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tool_result"
                                        ]
                                      },
                                      "reason": {
                                        "type": "string",
                                        "enum": [
                                          "agent_configured_untrusted",
                                          "inherited_from_parent",
                                          "tool_result_marked_untrusted",
                                          "tool_result_blocked"
                                        ]
                                      },
                                      "toolCallId": {
                                        "type": "string"
                                      },
                                      "toolName": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "reason",
                                      "toolCallId",
                                      "toolName"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "github-copilot:responses"
                                ]
                              },
                              "model": {
                                "nullable": true,
                                "type": "string"
                              },
                              "baselineModel": {
                                "nullable": true,
                                "type": "string"
                              },
                              "inputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "inputTokensEstimated": {
                                "type": "boolean"
                              },
                              "outputTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheReadTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWriteTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "cacheWrite1hTokens": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "baselineCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheCost": {
                                "nullable": true,
                                "type": "string"
                              },
                              "cacheSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonTokensBefore": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonTokensAfter": {
                                "nullable": true,
                                "type": "integer",
                                "minimum": -2147483648,
                                "maximum": 2147483647
                              },
                              "toonCostSavings": {
                                "nullable": true,
                                "type": "string"
                              },
                              "toonSkipReason": {
                                "nullable": true,
                                "type": "string",
                                "enum": [
                                  "not_enabled",
                                  "not_effective",
                                  "no_tool_results"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "chatErrors": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "conversationId": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    },
                                    "error": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "enum": [
                                            "rate_limit",
                                            "usage_limit_exceeded",
                                            "authentication",
                                            "permission_denied",
                                            "invalid_request",
                                            "provider_insufficient_balance",
                                            "not_found",
                                            "context_too_long",
                                            "request_too_large",
                                            "request_exceeds_rate_limit",
                                            "content_filtered",
                                            "server_error",
                                            "network_error",
                                            "empty_response",
                                            "incomplete_tool_call",
                                            "tool_call_output_truncated",
                                            "provider_auth_required",
                                            "tools_unsupported",
                                            "aborted",
                                            "unknown"
                                          ]
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "isRetryable": {
                                          "type": "boolean"
                                        },
                                        "sessionId": {
                                          "type": "string"
                                        },
                                        "traceId": {
                                          "type": "string"
                                        },
                                        "spanId": {
                                          "type": "string"
                                        },
                                        "usageLimitExceeded": {
                                          "type": "boolean"
                                        },
                                        "usageLimitEntityType": {
                                          "type": "string"
                                        },
                                        "authAction": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "providerLabel": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "provider",
                                            "providerLabel"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "originalError": {
                                          "type": "object",
                                          "properties": {
                                            "provider": {
                                              "type": "string",
                                              "enum": [
                                                "openai",
                                                "gemini",
                                                "anthropic",
                                                "bedrock",
                                                "cohere",
                                                "cerebras",
                                                "mistral",
                                                "perplexity",
                                                "groq",
                                                "xai",
                                                "openrouter",
                                                "vllm",
                                                "ollama",
                                                "ollama-native",
                                                "zhipuai",
                                                "deepseek",
                                                "minimax",
                                                "kimi",
                                                "azure",
                                                "github-copilot",
                                                "microsoft-365-copilot",
                                                "archestra"
                                              ]
                                            },
                                            "status": {
                                              "type": "number"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string"
                                            },
                                            "raw": {}
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "isRetryable"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "createdAt": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "conversationId",
                                    "error",
                                    "createdAt"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "connectorName": {
                                "nullable": true,
                                "type": "string"
                              },
                              "requestType": {
                                "type": "string",
                                "enum": [
                                  "main",
                                  "subagent"
                                ]
                              },
                              "externalAgentIdLabel": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "profileId",
                              "externalAgentId",
                              "executionId",
                              "userId",
                              "virtualKeyId",
                              "passthroughVirtualKeyId",
                              "environmentId",
                              "connectorId",
                              "sessionId",
                              "sessionSource",
                              "billingMode",
                              "authenticatedAppId",
                              "authenticatedAppName",
                              "request",
                              "response",
                              "type",
                              "model",
                              "baselineModel",
                              "inputTokens",
                              "inputTokensEstimated",
                              "outputTokens",
                              "cacheReadTokens",
                              "cacheWriteTokens",
                              "cacheWrite1hTokens",
                              "baselineCost",
                              "cost",
                              "cacheCost",
                              "cacheSavings",
                              "toonTokensBefore",
                              "toonTokensAfter",
                              "toonCostSavings",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "log:read"
          ]
        }
      }
    },
    "/api/interactions/sessions": {
      "get": {
        "operationId": "getInteractionSessions",
        "tags": [
          "Interaction"
        ],
        "description": "Get all interaction sessions grouped by session ID with aggregated stats\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`log:read`: View your own LLM proxy and MCP tool call logs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "profileId",
            "required": false,
            "description": "Filter by profile ID (internal Archestra profile)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "userId",
            "required": false,
            "description": "Filter by user ID (from X-Archestra-User-Id header)"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "api",
                "model_router",
                "chat",
                "chat:compaction",
                "a2a:compaction",
                "chat:title_generation",
                "chat:tool_call_repair",
                "a2a:tool_call_repair",
                "skill:description_generation",
                "guardrail:dual_llm",
                "chatops:slack",
                "chatops:ms-teams",
                "chatops:telegram",
                "email",
                "schedule-trigger",
                "knowledge:embedding",
                "knowledge:reranker",
                "knowledge:query-expansion",
                "knowledge:contextual-retrieval",
                "app:llm_complete",
                "app:recording_enhancement"
              ]
            },
            "in": "query",
            "name": "source",
            "required": false,
            "description": "Filter by interaction source"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "claude",
                "codex",
                "copilot-cli"
              ]
            },
            "in": "query",
            "name": "client",
            "required": false,
            "description": "Filter by client app (queries external_agent_id; e.g. claude)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "sessionId",
            "required": false,
            "description": "Filter by session ID"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "in": "query",
            "name": "startDate",
            "required": false,
            "description": "Filter by start date (ISO 8601 format)"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "in": "query",
            "name": "endDate",
            "required": false,
            "description": "Filter by end date (ISO 8601 format)"
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "sessionId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "sessionSource": {
                            "nullable": true,
                            "type": "string"
                          },
                          "source": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "api",
                              "model_router",
                              "chat",
                              "chat:compaction",
                              "a2a:compaction",
                              "chat:title_generation",
                              "chat:tool_call_repair",
                              "a2a:tool_call_repair",
                              "skill:description_generation",
                              "guardrail:dual_llm",
                              "chatops:slack",
                              "chatops:ms-teams",
                              "chatops:telegram",
                              "email",
                              "schedule-trigger",
                              "knowledge:embedding",
                              "knowledge:reranker",
                              "knowledge:query-expansion",
                              "knowledge:contextual-retrieval",
                              "app:llm_complete",
                              "app:recording_enhancement"
                            ]
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "api",
                                "model_router",
                                "chat",
                                "chat:compaction",
                                "a2a:compaction",
                                "chat:title_generation",
                                "chat:tool_call_repair",
                                "a2a:tool_call_repair",
                                "skill:description_generation",
                                "guardrail:dual_llm",
                                "chatops:slack",
                                "chatops:ms-teams",
                                "chatops:telegram",
                                "email",
                                "schedule-trigger",
                                "knowledge:embedding",
                                "knowledge:reranker",
                                "knowledge:query-expansion",
                                "knowledge:contextual-retrieval",
                                "app:llm_complete",
                                "app:recording_enhancement"
                              ]
                            }
                          },
                          "interactionId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "requestCount": {
                            "type": "number"
                          },
                          "totalInputTokens": {
                            "type": "number"
                          },
                          "totalOutputTokens": {
                            "type": "number"
                          },
                          "totalCacheReadTokens": {
                            "type": "number"
                          },
                          "totalCacheWriteTokens": {
                            "type": "number"
                          },
                          "totalCost": {
                            "nullable": true,
                            "type": "string"
                          },
                          "totalBilledCost": {
                            "nullable": true,
                            "type": "string"
                          },
                          "totalSubscriptionCost": {
                            "nullable": true,
                            "type": "string"
                          },
                          "totalBaselineCost": {
                            "nullable": true,
                            "type": "string"
                          },
                          "totalToonCostSavings": {
                            "nullable": true,
                            "type": "string"
                          },
                          "totalCacheSavings": {
                            "nullable": true,
                            "type": "string"
                          },
                          "toonSkipReasonCounts": {
                            "type": "object",
                            "properties": {
                              "applied": {
                                "type": "number"
                              },
                              "notEnabled": {
                                "type": "number"
                              },
                              "notEffective": {
                                "type": "number"
                              },
                              "noToolResults": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "applied",
                              "notEnabled",
                              "notEffective",
                              "noToolResults"
                            ],
                            "additionalProperties": false
                          },
                          "firstRequestTime": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastRequestTime": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "models": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "profileId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "profileName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "externalAgentIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "externalAgentIdLabels": {
                            "type": "array",
                            "items": {
                              "nullable": true,
                              "type": "string"
                            }
                          },
                          "authMethods": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "provider_key",
                                "virtual_key",
                                "passthrough_virtual_key",
                                "jwks",
                                "oauth_client_credentials",
                                "oauth_user",
                                "internal",
                                "unknown"
                              ]
                            }
                          },
                          "authenticatedAppNames": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "userNames": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "userIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "unattributedReason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "shared_virtual_key",
                                  "provider_key",
                                  "client_credentials",
                                  "internal",
                                  "unknown"
                                ]
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          "lastUserMessagePreview": {
                            "nullable": true,
                            "description": "Short preview (max 200 chars) of the session's last user message. Raw request bodies are not returned by this listing.",
                            "type": "string",
                            "maxLength": 200
                          },
                          "lastInteractionType": {
                            "nullable": true,
                            "type": "string"
                          },
                          "conversationTitle": {
                            "nullable": true,
                            "type": "string"
                          },
                          "claudeCodeTitle": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "sessionId",
                          "sessionSource",
                          "source",
                          "sources",
                          "interactionId",
                          "requestCount",
                          "totalInputTokens",
                          "totalOutputTokens",
                          "totalCacheReadTokens",
                          "totalCacheWriteTokens",
                          "totalCost",
                          "totalBilledCost",
                          "totalSubscriptionCost",
                          "totalBaselineCost",
                          "totalToonCostSavings",
                          "totalCacheSavings",
                          "toonSkipReasonCounts",
                          "firstRequestTime",
                          "lastRequestTime",
                          "models",
                          "profileId",
                          "profileName",
                          "externalAgentIds",
                          "externalAgentIdLabels",
                          "authMethods",
                          "authenticatedAppNames",
                          "userNames",
                          "userIds",
                          "unattributedReason",
                          "lastUserMessagePreview",
                          "lastInteractionType",
                          "conversationTitle",
                          "claudeCodeTitle"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "log:read"
          ]
        }
      }
    },
    "/api/interactions/external-agent-ids": {
      "get": {
        "operationId": "getUniqueExternalAgentIds",
        "tags": [
          "Interaction"
        ],
        "description": "Get all unique external agent IDs with display names for filtering (from X-Archestra-Agent-Id header)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`log:read`: View your own LLM proxy and MCP tool call logs",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "displayName"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "log:read"
          ]
        }
      }
    },
    "/api/interactions/user-ids": {
      "get": {
        "operationId": "getUniqueUserIds",
        "tags": [
          "Interaction"
        ],
        "description": "Get all unique user IDs with names for filtering (from X-Archestra-User-Id header)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`log:read`: View your own LLM proxy and MCP tool call logs",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "log:read"
          ]
        }
      }
    },
    "/api/interactions/{interactionId}": {
      "get": {
        "operationId": "getInteraction",
        "tags": [
          "Interaction"
        ],
        "description": "Get interaction by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`log:read`: View your own LLM proxy and MCP tool call logs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "interactionId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OpenAiChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "openai:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    }
                                  ]
                                },
                                "instructions": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "max_output_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "metadata": {
                                  "nullable": true,
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "previous_response_id": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "text": {},
                                "tool_choice": {},
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "nullable": true,
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "name"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    ]
                                  }
                                },
                                "top_p": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "user": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    }
                                  ]
                                },
                                "instructions": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "max_output_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "metadata": {
                                  "nullable": true,
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "previous_response_id": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "text": {},
                                "tool_choice": {},
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "nullable": true,
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "name"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    ]
                                  }
                                },
                                "top_p": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "user": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "response"
                                  ]
                                },
                                "created_at": {
                                  "type": "number"
                                },
                                "model": {
                                  "type": "string"
                                },
                                "output": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "message"
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "status": {
                                            "type": "string"
                                          },
                                          "content": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "output_text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": {},
                                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": {},
                                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                                }
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "type",
                                          "role",
                                          "status",
                                          "content"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function_call"
                                            ]
                                          },
                                          "id": {
                                            "type": "string"
                                          },
                                          "call_id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "status": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "call_id",
                                          "name",
                                          "arguments"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "input_tokens": {
                                      "type": "number"
                                    },
                                    "output_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "input_tokens",
                                    "output_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": {},
                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                                }
                              },
                              "required": [
                                "id",
                                "object",
                                "created_at",
                                "model",
                                "output",
                                "status"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "openai:responses"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                },
                                "dimensions": {
                                  "type": "number"
                                },
                                "encoding_format": {
                                  "type": "string",
                                  "enum": [
                                    "float",
                                    "base64"
                                  ]
                                }
                              },
                              "required": [
                                "model",
                                "input"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                },
                                "dimensions": {
                                  "type": "number"
                                },
                                "encoding_format": {
                                  "type": "string",
                                  "enum": [
                                    "float",
                                    "base64"
                                  ]
                                }
                              },
                              "required": [
                                "model",
                                "input"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "list"
                                  ]
                                },
                                "data": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "embedding"
                                        ]
                                      },
                                      "embedding": {
                                        "type": "array",
                                        "items": {
                                          "type": "number"
                                        }
                                      },
                                      "index": {
                                        "type": "number"
                                      },
                                      "truncatedFrom": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "object",
                                      "embedding"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "model": {
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "prompt_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "prompt_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "object",
                                "data",
                                "model",
                                "usage"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "openai:embeddings"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                },
                                "dimensions": {
                                  "type": "number"
                                },
                                "encoding_format": {
                                  "type": "string",
                                  "enum": [
                                    "float",
                                    "base64"
                                  ]
                                }
                              },
                              "required": [
                                "model",
                                "input"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                },
                                "dimensions": {
                                  "type": "number"
                                },
                                "encoding_format": {
                                  "type": "string",
                                  "enum": [
                                    "float",
                                    "base64"
                                  ]
                                }
                              },
                              "required": [
                                "model",
                                "input"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "list"
                                  ]
                                },
                                "data": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "embedding"
                                        ]
                                      },
                                      "embedding": {
                                        "type": "array",
                                        "items": {
                                          "type": "number"
                                        }
                                      },
                                      "index": {
                                        "type": "number"
                                      },
                                      "truncatedFrom": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "object",
                                      "embedding"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "model": {
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "prompt_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "prompt_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "object",
                                "data",
                                "model",
                                "usage"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "gemini:embeddings"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                },
                                "dimensions": {
                                  "type": "number"
                                },
                                "encoding_format": {
                                  "type": "string",
                                  "enum": [
                                    "float",
                                    "base64"
                                  ]
                                }
                              },
                              "required": [
                                "model",
                                "input"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  ]
                                },
                                "dimensions": {
                                  "type": "number"
                                },
                                "encoding_format": {
                                  "type": "string",
                                  "enum": [
                                    "float",
                                    "base64"
                                  ]
                                }
                              },
                              "required": [
                                "model",
                                "input"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "list"
                                  ]
                                },
                                "data": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "object": {
                                        "type": "string",
                                        "enum": [
                                          "embedding"
                                        ]
                                      },
                                      "embedding": {
                                        "type": "array",
                                        "items": {
                                          "type": "number"
                                        }
                                      },
                                      "index": {
                                        "type": "number"
                                      },
                                      "truncatedFrom": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "object",
                                      "embedding"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "model": {
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "prompt_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "prompt_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "object",
                                "data",
                                "model",
                                "usage"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "bedrock:embeddings"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/GeminiGenerateContentRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/GeminiGenerateContentRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/GeminiGenerateContentResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "gemini:generateContent"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/AnthropicMessagesRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/AnthropicMessagesRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/AnthropicMessagesResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "anthropic:messages"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "modelId": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "user",
                                          "assistant"
                                        ]
                                      },
                                      "content": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "image": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "png",
                                                        "jpeg",
                                                        "gif",
                                                        "webp"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "image"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "document": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pdf",
                                                        "csv",
                                                        "doc",
                                                        "docx",
                                                        "xls",
                                                        "xlsx",
                                                        "html",
                                                        "txt",
                                                        "md"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "name",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "document"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "guardContent": {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "object",
                                                      "properties": {
                                                        "text": {
                                                          "type": "string"
                                                        },
                                                        "qualifiers": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grounding_source",
                                                              "query",
                                                              "guard_content"
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "text"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "required": [
                                                    "text"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "guardContent"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "toolUse": {
                                                  "type": "object",
                                                  "properties": {
                                                    "toolUseId": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "input": {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "toolUseId",
                                                    "name",
                                                    "input"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "toolUse"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "toolResult": {
                                                  "type": "object",
                                                  "properties": {
                                                    "toolUseId": {
                                                      "type": "string"
                                                    },
                                                    "content": {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "text"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "image": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "png",
                                                                      "jpeg",
                                                                      "gif",
                                                                      "webp"
                                                                    ]
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "bytes": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "bytes"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "s3Location": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "uri": {
                                                                                "type": "string"
                                                                              },
                                                                              "bucketOwner": {
                                                                                "type": "string"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "uri"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "s3Location"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "format",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            },
                                                            "required": [
                                                              "image"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "json": {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            },
                                                            "required": [
                                                              "json"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "document": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "pdf",
                                                                      "csv",
                                                                      "doc",
                                                                      "docx",
                                                                      "xls",
                                                                      "xlsx",
                                                                      "html",
                                                                      "txt",
                                                                      "md"
                                                                    ]
                                                                  },
                                                                  "name": {
                                                                    "type": "string"
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "bytes": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "bytes"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "s3Location": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "uri": {
                                                                                "type": "string"
                                                                              },
                                                                              "bucketOwner": {
                                                                                "type": "string"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "uri"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "s3Location"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "format",
                                                                  "name",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            },
                                                            "required": [
                                                              "document"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "status": {
                                                      "type": "string",
                                                      "enum": [
                                                        "success",
                                                        "error"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "toolUseId",
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "toolResult"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "cachePoint": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string"
                                                    },
                                                    "ttl": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "cachePoint"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "reasoningContent": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "reasoningText": {
                                                          "type": "object",
                                                          "properties": {
                                                            "text": {
                                                              "type": "string"
                                                            },
                                                            "signature": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "text"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "required": [
                                                        "reasoningText"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "redactedReasoning": {
                                                          "type": "object",
                                                          "properties": {
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "required": [
                                                        "redactedReasoning"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "reasoningContent"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "role",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "system": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "guardContent": {
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "object",
                                                "properties": {
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "qualifiers": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "enum": [
                                                        "grounding_source",
                                                        "query",
                                                        "guard_content"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "text"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "text"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "guardContent"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "cachePoint": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string"
                                              },
                                              "ttl": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "cachePoint"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                "inferenceConfig": {
                                  "type": "object",
                                  "properties": {
                                    "maxTokens": {
                                      "type": "number"
                                    },
                                    "temperature": {
                                      "type": "number"
                                    },
                                    "topP": {
                                      "type": "number"
                                    },
                                    "stopSequences": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "toolConfig": {
                                  "type": "object",
                                  "properties": {
                                    "tools": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "toolSpec": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "inputSchema": {
                                                "type": "object",
                                                "properties": {
                                                  "json": {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                },
                                                "required": [
                                                  "json"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "inputSchema"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "toolSpec"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "toolChoice": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "tool": {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "tool"
                                          ],
                                          "additionalProperties": {}
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "any": {
                                              "type": "object",
                                              "properties": {},
                                              "additionalProperties": {}
                                            }
                                          },
                                          "required": [
                                            "any"
                                          ],
                                          "additionalProperties": {}
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "auto": {
                                              "type": "object",
                                              "properties": {},
                                              "additionalProperties": {}
                                            }
                                          },
                                          "required": [
                                            "auto"
                                          ],
                                          "additionalProperties": {}
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "tools"
                                  ],
                                  "additionalProperties": false
                                },
                                "guardrailConfig": {
                                  "type": "object",
                                  "properties": {
                                    "guardrailIdentifier": {
                                      "type": "string"
                                    },
                                    "guardrailVersion": {
                                      "type": "string"
                                    },
                                    "trace": {
                                      "type": "string",
                                      "enum": [
                                        "enabled",
                                        "disabled"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "guardrailIdentifier",
                                    "guardrailVersion"
                                  ],
                                  "additionalProperties": false
                                },
                                "additionalModelRequestFields": {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "additionalModelResponseFieldPaths": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "promptVariables": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "json": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": [
                                          "json"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                },
                                "performanceConfig": {
                                  "type": "object",
                                  "properties": {
                                    "latency": {
                                      "type": "string",
                                      "enum": [
                                        "optimized"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "serviceTier": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "throughput"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "requestMetadata": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "_isStreaming": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "modelId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "modelId": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "user",
                                          "assistant"
                                        ]
                                      },
                                      "content": {
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "image": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "png",
                                                        "jpeg",
                                                        "gif",
                                                        "webp"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "image"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "document": {
                                                  "type": "object",
                                                  "properties": {
                                                    "format": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pdf",
                                                        "csv",
                                                        "doc",
                                                        "docx",
                                                        "xls",
                                                        "xlsx",
                                                        "html",
                                                        "txt",
                                                        "md"
                                                      ]
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "bytes": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "bytes"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "s3Location": {
                                                              "type": "object",
                                                              "properties": {
                                                                "uri": {
                                                                  "type": "string"
                                                                },
                                                                "bucketOwner": {
                                                                  "type": "string"
                                                                }
                                                              },
                                                              "required": [
                                                                "uri"
                                                              ],
                                                              "additionalProperties": false
                                                            }
                                                          },
                                                          "required": [
                                                            "s3Location"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "format",
                                                    "name",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "document"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "guardContent": {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "object",
                                                      "properties": {
                                                        "text": {
                                                          "type": "string"
                                                        },
                                                        "qualifiers": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "enum": [
                                                              "grounding_source",
                                                              "query",
                                                              "guard_content"
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "text"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  },
                                                  "required": [
                                                    "text"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "guardContent"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "toolUse": {
                                                  "type": "object",
                                                  "properties": {
                                                    "toolUseId": {
                                                      "type": "string"
                                                    },
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "input": {
                                                      "type": "object",
                                                      "additionalProperties": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "toolUseId",
                                                    "name",
                                                    "input"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "toolUse"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "toolResult": {
                                                  "type": "object",
                                                  "properties": {
                                                    "toolUseId": {
                                                      "type": "string"
                                                    },
                                                    "content": {
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "text": {
                                                                "type": "string"
                                                              }
                                                            },
                                                            "required": [
                                                              "text"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "image": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "png",
                                                                      "jpeg",
                                                                      "gif",
                                                                      "webp"
                                                                    ]
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "bytes": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "bytes"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "s3Location": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "uri": {
                                                                                "type": "string"
                                                                              },
                                                                              "bucketOwner": {
                                                                                "type": "string"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "uri"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "s3Location"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "format",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            },
                                                            "required": [
                                                              "image"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "json": {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                              }
                                                            },
                                                            "required": [
                                                              "json"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          {
                                                            "type": "object",
                                                            "properties": {
                                                              "document": {
                                                                "type": "object",
                                                                "properties": {
                                                                  "format": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "pdf",
                                                                      "csv",
                                                                      "doc",
                                                                      "docx",
                                                                      "xls",
                                                                      "xlsx",
                                                                      "html",
                                                                      "txt",
                                                                      "md"
                                                                    ]
                                                                  },
                                                                  "name": {
                                                                    "type": "string"
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "bytes": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "bytes"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "s3Location": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                              "uri": {
                                                                                "type": "string"
                                                                              },
                                                                              "bucketOwner": {
                                                                                "type": "string"
                                                                              }
                                                                            },
                                                                            "required": [
                                                                              "uri"
                                                                            ],
                                                                            "additionalProperties": false
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "s3Location"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                },
                                                                "required": [
                                                                  "format",
                                                                  "name",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false
                                                              }
                                                            },
                                                            "required": [
                                                              "document"
                                                            ],
                                                            "additionalProperties": false
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "status": {
                                                      "type": "string",
                                                      "enum": [
                                                        "success",
                                                        "error"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "toolUseId",
                                                    "content"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "toolResult"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "cachePoint": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string"
                                                    },
                                                    "ttl": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "cachePoint"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "reasoningContent": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "reasoningText": {
                                                          "type": "object",
                                                          "properties": {
                                                            "text": {
                                                              "type": "string"
                                                            },
                                                            "signature": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "text"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "required": [
                                                        "reasoningText"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "redactedReasoning": {
                                                          "type": "object",
                                                          "properties": {
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      },
                                                      "required": [
                                                        "redactedReasoning"
                                                      ],
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "reasoningContent"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "role",
                                      "content"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "system": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "guardContent": {
                                            "type": "object",
                                            "properties": {
                                              "text": {
                                                "type": "object",
                                                "properties": {
                                                  "text": {
                                                    "type": "string"
                                                  },
                                                  "qualifiers": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "enum": [
                                                        "grounding_source",
                                                        "query",
                                                        "guard_content"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "text"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "text"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "guardContent"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "cachePoint": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string"
                                              },
                                              "ttl": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "cachePoint"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                "inferenceConfig": {
                                  "type": "object",
                                  "properties": {
                                    "maxTokens": {
                                      "type": "number"
                                    },
                                    "temperature": {
                                      "type": "number"
                                    },
                                    "topP": {
                                      "type": "number"
                                    },
                                    "stopSequences": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "toolConfig": {
                                  "type": "object",
                                  "properties": {
                                    "tools": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "toolSpec": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "inputSchema": {
                                                "type": "object",
                                                "properties": {
                                                  "json": {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                  }
                                                },
                                                "required": [
                                                  "json"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "inputSchema"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "toolSpec"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "toolChoice": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "tool": {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "tool"
                                          ],
                                          "additionalProperties": {}
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "any": {
                                              "type": "object",
                                              "properties": {},
                                              "additionalProperties": {}
                                            }
                                          },
                                          "required": [
                                            "any"
                                          ],
                                          "additionalProperties": {}
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "auto": {
                                              "type": "object",
                                              "properties": {},
                                              "additionalProperties": {}
                                            }
                                          },
                                          "required": [
                                            "auto"
                                          ],
                                          "additionalProperties": {}
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "tools"
                                  ],
                                  "additionalProperties": false
                                },
                                "guardrailConfig": {
                                  "type": "object",
                                  "properties": {
                                    "guardrailIdentifier": {
                                      "type": "string"
                                    },
                                    "guardrailVersion": {
                                      "type": "string"
                                    },
                                    "trace": {
                                      "type": "string",
                                      "enum": [
                                        "enabled",
                                        "disabled"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "guardrailIdentifier",
                                    "guardrailVersion"
                                  ],
                                  "additionalProperties": false
                                },
                                "additionalModelRequestFields": {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "additionalModelResponseFieldPaths": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "promptVariables": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "json": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          }
                                        },
                                        "required": [
                                          "json"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                },
                                "performanceConfig": {
                                  "type": "object",
                                  "properties": {
                                    "latency": {
                                      "type": "string",
                                      "enum": [
                                        "optimized"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "serviceTier": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "throughput"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "requestMetadata": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "_isStreaming": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "modelId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "$metadata": {
                                  "type": "object",
                                  "properties": {
                                    "httpStatusCode": {
                                      "type": "number"
                                    },
                                    "requestId": {
                                      "type": "string"
                                    },
                                    "attempts": {
                                      "type": "number"
                                    },
                                    "totalRetryDelay": {
                                      "type": "number"
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "output": {
                                  "type": "object",
                                  "properties": {
                                    "message": {
                                      "type": "object",
                                      "properties": {
                                        "role": {
                                          "type": "string",
                                          "enum": [
                                            "assistant"
                                          ]
                                        },
                                        "content": {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "text": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "text"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "toolUse": {
                                                    "type": "object",
                                                    "properties": {
                                                      "toolUseId": {
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      },
                                                      "input": {
                                                        "type": "object",
                                                        "additionalProperties": {}
                                                      }
                                                    },
                                                    "required": [
                                                      "toolUseId",
                                                      "name",
                                                      "input"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                "required": [
                                                  "toolUse"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          }
                                        }
                                      },
                                      "required": [
                                        "role",
                                        "content"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "stopReason": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "end_turn",
                                        "tool_use",
                                        "max_tokens",
                                        "stop_sequence",
                                        "guardrail_intervened",
                                        "content_filtered",
                                        "malformed_model_output",
                                        "malformed_tool_use",
                                        "model_context_window_exceeded"
                                      ]
                                    },
                                    {
                                      "type": "string"
                                    }
                                  ]
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "inputTokens": {
                                      "type": "number"
                                    },
                                    "outputTokens": {
                                      "type": "number"
                                    },
                                    "totalTokens": {
                                      "type": "number"
                                    },
                                    "cacheReadInputTokens": {
                                      "type": "number"
                                    },
                                    "cacheWriteInputTokens": {
                                      "type": "number"
                                    },
                                    "cacheDetails": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "ttl": {
                                            "type": "string"
                                          },
                                          "inputTokens": {
                                            "type": "number"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "inputTokens",
                                    "outputTokens"
                                  ],
                                  "additionalProperties": false
                                },
                                "metrics": {
                                  "type": "object",
                                  "properties": {
                                    "latencyMs": {
                                      "type": "number"
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "additionalModelResponseFields": {
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "trace": {
                                  "type": "object",
                                  "properties": {
                                    "guardrail": {
                                      "type": "object",
                                      "properties": {
                                        "inputAssessment": {
                                          "type": "object",
                                          "additionalProperties": {}
                                        },
                                        "outputAssessments": {
                                          "type": "object",
                                          "additionalProperties": {}
                                        },
                                        "modelOutput": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "actionReason": {
                                          "type": "string"
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "promptRouter": {
                                      "type": "object",
                                      "properties": {
                                        "invokedModelId": {
                                          "type": "string"
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "performanceConfig": {
                                  "type": "object",
                                  "properties": {
                                    "latency": {
                                      "type": "string",
                                      "enum": [
                                        "optimized"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "serviceTier": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "throughput"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "output",
                                "stopReason",
                                "usage"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "bedrock:converse"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "content": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "array",
                                                      "items": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string"
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "document"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "application/pdf"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text/plain"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string",
                                                              "format": "uri"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "content"
                                                              ]
                                                            },
                                                            "content": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "text": {
                                                                            "type": "string"
                                                                          },
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text"
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          },
                                                                          "citations": {
                                                                            "nullable": true,
                                                                            "type": "array",
                                                                            "items": {}
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "text",
                                                                          "type"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "image"
                                                                            ]
                                                                          },
                                                                          "source": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "base64"
                                                                                    ]
                                                                                  },
                                                                                  "media_type": {
                                                                                    "type": "string"
                                                                                  },
                                                                                  "data": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "media_type",
                                                                                  "data"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "url"
                                                                                    ]
                                                                                  },
                                                                                  "url": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "url"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "source"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "content"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    "title": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "context": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "object",
                                                      "properties": {
                                                        "enabled": {
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "enabled"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "thinking"
                                                      ]
                                                    },
                                                    "thinking": {
                                                      "type": "string"
                                                    },
                                                    "signature": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "thinking",
                                                    "signature"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "redacted_thinking"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "data"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "input": {},
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "tool_use"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "input",
                                                    "name",
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "tool_use_id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "tool_result"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "content": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "text": {
                                                                    "type": "string"
                                                                  },
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "text"
                                                                    ]
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  },
                                                                  "citations": {
                                                                    "nullable": true,
                                                                    "type": "array",
                                                                    "items": {}
                                                                  }
                                                                },
                                                                "required": [
                                                                  "text",
                                                                  "type"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "image"
                                                                    ]
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "base64"
                                                                            ]
                                                                          },
                                                                          "media_type": {
                                                                            "type": "string"
                                                                          },
                                                                          "data": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "media_type",
                                                                          "data"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "url"
                                                                            ]
                                                                          },
                                                                          "url": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "url"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "document"
                                                                    ]
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "base64"
                                                                            ]
                                                                          },
                                                                          "media_type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "application/pdf"
                                                                            ]
                                                                          },
                                                                          "data": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "media_type",
                                                                          "data"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text"
                                                                            ]
                                                                          },
                                                                          "media_type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text/plain"
                                                                            ]
                                                                          },
                                                                          "data": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "media_type",
                                                                          "data"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "url"
                                                                            ]
                                                                          },
                                                                          "url": {
                                                                            "type": "string",
                                                                            "format": "uri"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "url"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "content"
                                                                            ]
                                                                          },
                                                                          "content": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "string"
                                                                              },
                                                                              {
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "object",
                                                                                      "properties": {
                                                                                        "text": {
                                                                                          "type": "string"
                                                                                        },
                                                                                        "type": {
                                                                                          "type": "string",
                                                                                          "enum": [
                                                                                            "text"
                                                                                          ]
                                                                                        },
                                                                                        "cache_control": {
                                                                                          "nullable": true
                                                                                        },
                                                                                        "citations": {
                                                                                          "nullable": true,
                                                                                          "type": "array",
                                                                                          "items": {}
                                                                                        }
                                                                                      },
                                                                                      "required": [
                                                                                        "text",
                                                                                        "type"
                                                                                      ],
                                                                                      "additionalProperties": false
                                                                                    },
                                                                                    {
                                                                                      "type": "object",
                                                                                      "properties": {
                                                                                        "type": {
                                                                                          "type": "string",
                                                                                          "enum": [
                                                                                            "image"
                                                                                          ]
                                                                                        },
                                                                                        "source": {
                                                                                          "anyOf": [
                                                                                            {
                                                                                              "type": "object",
                                                                                              "properties": {
                                                                                                "type": {
                                                                                                  "type": "string",
                                                                                                  "enum": [
                                                                                                    "base64"
                                                                                                  ]
                                                                                                },
                                                                                                "media_type": {
                                                                                                  "type": "string"
                                                                                                },
                                                                                                "data": {
                                                                                                  "type": "string"
                                                                                                }
                                                                                              },
                                                                                              "required": [
                                                                                                "type",
                                                                                                "media_type",
                                                                                                "data"
                                                                                              ],
                                                                                              "additionalProperties": false
                                                                                            },
                                                                                            {
                                                                                              "type": "object",
                                                                                              "properties": {
                                                                                                "type": {
                                                                                                  "type": "string",
                                                                                                  "enum": [
                                                                                                    "url"
                                                                                                  ]
                                                                                                },
                                                                                                "url": {
                                                                                                  "type": "string"
                                                                                                }
                                                                                              },
                                                                                              "required": [
                                                                                                "type",
                                                                                                "url"
                                                                                              ],
                                                                                              "additionalProperties": false
                                                                                            }
                                                                                          ]
                                                                                        },
                                                                                        "cache_control": {
                                                                                          "nullable": true
                                                                                        }
                                                                                      },
                                                                                      "required": [
                                                                                        "type",
                                                                                        "source"
                                                                                      ],
                                                                                      "additionalProperties": false
                                                                                    }
                                                                                  ]
                                                                                }
                                                                              }
                                                                            ]
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "content"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  "title": {
                                                                    "nullable": true,
                                                                    "type": "string"
                                                                  },
                                                                  "context": {
                                                                    "nullable": true,
                                                                    "type": "string"
                                                                  },
                                                                  "citations": {
                                                                    "nullable": true,
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "enabled": {
                                                                        "type": "boolean"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "enabled"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    },
                                                    "is_error": {
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "tool_use_id",
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "search_result",
                                                        "server_tool_use",
                                                        "web_search_tool_result",
                                                        "web_fetch_tool_result",
                                                        "code_execution_tool_result",
                                                        "bash_code_execution_tool_result",
                                                        "text_editor_code_execution_tool_result",
                                                        "tool_search_tool_result",
                                                        "container_upload"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": {}
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      },
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "user",
                                          "assistant",
                                          "system"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "content",
                                      "role"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "max_tokens": {
                                  "type": "number"
                                },
                                "container": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "context_management": {
                                  "nullable": true,
                                  "type": "object",
                                  "properties": {},
                                  "additionalProperties": false
                                },
                                "mcp_servers": {
                                  "type": "array",
                                  "items": {}
                                },
                                "metadata": {
                                  "type": "object",
                                  "properties": {
                                    "user_id": {
                                      "nullable": true,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "user_id"
                                  ],
                                  "additionalProperties": false
                                },
                                "output_config": {
                                  "type": "object",
                                  "properties": {
                                    "effort": {
                                      "nullable": true,
                                      "type": "string"
                                    },
                                    "format": {
                                      "nullable": true,
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "json_schema"
                                          ]
                                        },
                                        "schema": {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "schema"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "service_tier": {},
                                "speed": {
                                  "type": "string",
                                  "enum": [
                                    "fast",
                                    "standard"
                                  ]
                                },
                                "stop_sequences": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "stream": {
                                  "type": "boolean"
                                },
                                "system": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "cache_control": {
                                          "nullable": true
                                        },
                                        "citations": {
                                          "nullable": true,
                                          "type": "array",
                                          "items": {}
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          },
                                          "citations": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {}
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  ]
                                },
                                "temperature": {
                                  "type": "number"
                                },
                                "thinking": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "enabled"
                                          ]
                                        },
                                        "budget_tokens": {
                                          "type": "number"
                                        },
                                        "display": {
                                          "nullable": true,
                                          "type": "string",
                                          "enum": [
                                            "summarized",
                                            "omitted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "budget_tokens"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "disabled"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "adaptive"
                                          ]
                                        },
                                        "display": {
                                          "nullable": true,
                                          "type": "string",
                                          "enum": [
                                            "summarized",
                                            "omitted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "tool_choice": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "auto"
                                          ]
                                        },
                                        "disable_parallel_tool_use": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "any"
                                          ]
                                        },
                                        "disable_parallel_tool_use": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "tool"
                                          ]
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "disable_parallel_tool_use": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "none"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "nullable": true,
                                            "type": "string",
                                            "enum": [
                                              "custom"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          },
                                          "input_schema": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "description": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "input_schema"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "bash"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "bash_20250124"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "str_replace_editor"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text_editor_20250124"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "str_replace_based_edit_tool"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text_editor_20250429"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "str_replace_based_edit_tool"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text_editor_20250728"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          },
                                          "max_characters": {
                                            "nullable": true,
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "web_search"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "web_search_20250305"
                                            ]
                                          },
                                          "allowed_domains": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "blocked_domains": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          },
                                          "max_uses": {
                                            "nullable": true,
                                            "type": "number"
                                          },
                                          "user_location": {
                                            "nullable": true
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                },
                                "top_k": {
                                  "type": "number"
                                },
                                "top_p": {
                                  "type": "number"
                                },
                                "anthropic_version": {
                                  "type": "string"
                                },
                                "anthropic_beta": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "_isStreaming": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "messages",
                                "max_tokens"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "content": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "text": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "array",
                                                      "items": {}
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "image"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string"
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "document"
                                                      ]
                                                    },
                                                    "source": {
                                                      "anyOf": [
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "base64"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "application/pdf"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text"
                                                              ]
                                                            },
                                                            "media_type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "text/plain"
                                                              ]
                                                            },
                                                            "data": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "media_type",
                                                            "data"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "url"
                                                              ]
                                                            },
                                                            "url": {
                                                              "type": "string",
                                                              "format": "uri"
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "url"
                                                          ],
                                                          "additionalProperties": false
                                                        },
                                                        {
                                                          "type": "object",
                                                          "properties": {
                                                            "type": {
                                                              "type": "string",
                                                              "enum": [
                                                                "content"
                                                              ]
                                                            },
                                                            "content": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "string"
                                                                },
                                                                {
                                                                  "type": "array",
                                                                  "items": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "text": {
                                                                            "type": "string"
                                                                          },
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text"
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          },
                                                                          "citations": {
                                                                            "nullable": true,
                                                                            "type": "array",
                                                                            "items": {}
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "text",
                                                                          "type"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "image"
                                                                            ]
                                                                          },
                                                                          "source": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "base64"
                                                                                    ]
                                                                                  },
                                                                                  "media_type": {
                                                                                    "type": "string"
                                                                                  },
                                                                                  "data": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "media_type",
                                                                                  "data"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              },
                                                                              {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                  "type": {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                      "url"
                                                                                    ]
                                                                                  },
                                                                                  "url": {
                                                                                    "type": "string"
                                                                                  }
                                                                                },
                                                                                "required": [
                                                                                  "type",
                                                                                  "url"
                                                                                ],
                                                                                "additionalProperties": false
                                                                              }
                                                                            ]
                                                                          },
                                                                          "cache_control": {
                                                                            "nullable": true
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "source"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "type",
                                                            "content"
                                                          ],
                                                          "additionalProperties": false
                                                        }
                                                      ]
                                                    },
                                                    "title": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "context": {
                                                      "nullable": true,
                                                      "type": "string"
                                                    },
                                                    "citations": {
                                                      "nullable": true,
                                                      "type": "object",
                                                      "properties": {
                                                        "enabled": {
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "enabled"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "source"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "thinking"
                                                      ]
                                                    },
                                                    "thinking": {
                                                      "type": "string"
                                                    },
                                                    "signature": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "thinking",
                                                    "signature"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "redacted_thinking"
                                                      ]
                                                    },
                                                    "data": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "data"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "input": {},
                                                    "name": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "tool_use"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "input",
                                                    "name",
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "tool_use_id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "tool_result"
                                                      ]
                                                    },
                                                    "cache_control": {
                                                      "nullable": true
                                                    },
                                                    "content": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "array",
                                                          "items": {
                                                            "anyOf": [
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "text": {
                                                                    "type": "string"
                                                                  },
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "text"
                                                                    ]
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  },
                                                                  "citations": {
                                                                    "nullable": true,
                                                                    "type": "array",
                                                                    "items": {}
                                                                  }
                                                                },
                                                                "required": [
                                                                  "text",
                                                                  "type"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "image"
                                                                    ]
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "base64"
                                                                            ]
                                                                          },
                                                                          "media_type": {
                                                                            "type": "string"
                                                                          },
                                                                          "data": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "media_type",
                                                                          "data"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "url"
                                                                            ]
                                                                          },
                                                                          "url": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "url"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false
                                                              },
                                                              {
                                                                "type": "object",
                                                                "properties": {
                                                                  "type": {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "document"
                                                                    ]
                                                                  },
                                                                  "source": {
                                                                    "anyOf": [
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "base64"
                                                                            ]
                                                                          },
                                                                          "media_type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "application/pdf"
                                                                            ]
                                                                          },
                                                                          "data": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "media_type",
                                                                          "data"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text"
                                                                            ]
                                                                          },
                                                                          "media_type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "text/plain"
                                                                            ]
                                                                          },
                                                                          "data": {
                                                                            "type": "string"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "media_type",
                                                                          "data"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "url"
                                                                            ]
                                                                          },
                                                                          "url": {
                                                                            "type": "string",
                                                                            "format": "uri"
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "url"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      },
                                                                      {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "type": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "content"
                                                                            ]
                                                                          },
                                                                          "content": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "string"
                                                                              },
                                                                              {
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "object",
                                                                                      "properties": {
                                                                                        "text": {
                                                                                          "type": "string"
                                                                                        },
                                                                                        "type": {
                                                                                          "type": "string",
                                                                                          "enum": [
                                                                                            "text"
                                                                                          ]
                                                                                        },
                                                                                        "cache_control": {
                                                                                          "nullable": true
                                                                                        },
                                                                                        "citations": {
                                                                                          "nullable": true,
                                                                                          "type": "array",
                                                                                          "items": {}
                                                                                        }
                                                                                      },
                                                                                      "required": [
                                                                                        "text",
                                                                                        "type"
                                                                                      ],
                                                                                      "additionalProperties": false
                                                                                    },
                                                                                    {
                                                                                      "type": "object",
                                                                                      "properties": {
                                                                                        "type": {
                                                                                          "type": "string",
                                                                                          "enum": [
                                                                                            "image"
                                                                                          ]
                                                                                        },
                                                                                        "source": {
                                                                                          "anyOf": [
                                                                                            {
                                                                                              "type": "object",
                                                                                              "properties": {
                                                                                                "type": {
                                                                                                  "type": "string",
                                                                                                  "enum": [
                                                                                                    "base64"
                                                                                                  ]
                                                                                                },
                                                                                                "media_type": {
                                                                                                  "type": "string"
                                                                                                },
                                                                                                "data": {
                                                                                                  "type": "string"
                                                                                                }
                                                                                              },
                                                                                              "required": [
                                                                                                "type",
                                                                                                "media_type",
                                                                                                "data"
                                                                                              ],
                                                                                              "additionalProperties": false
                                                                                            },
                                                                                            {
                                                                                              "type": "object",
                                                                                              "properties": {
                                                                                                "type": {
                                                                                                  "type": "string",
                                                                                                  "enum": [
                                                                                                    "url"
                                                                                                  ]
                                                                                                },
                                                                                                "url": {
                                                                                                  "type": "string"
                                                                                                }
                                                                                              },
                                                                                              "required": [
                                                                                                "type",
                                                                                                "url"
                                                                                              ],
                                                                                              "additionalProperties": false
                                                                                            }
                                                                                          ]
                                                                                        },
                                                                                        "cache_control": {
                                                                                          "nullable": true
                                                                                        }
                                                                                      },
                                                                                      "required": [
                                                                                        "type",
                                                                                        "source"
                                                                                      ],
                                                                                      "additionalProperties": false
                                                                                    }
                                                                                  ]
                                                                                }
                                                                              }
                                                                            ]
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "type",
                                                                          "content"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    ]
                                                                  },
                                                                  "title": {
                                                                    "nullable": true,
                                                                    "type": "string"
                                                                  },
                                                                  "context": {
                                                                    "nullable": true,
                                                                    "type": "string"
                                                                  },
                                                                  "citations": {
                                                                    "nullable": true,
                                                                    "type": "object",
                                                                    "properties": {
                                                                      "enabled": {
                                                                        "type": "boolean"
                                                                      }
                                                                    },
                                                                    "required": [
                                                                      "enabled"
                                                                    ],
                                                                    "additionalProperties": false
                                                                  },
                                                                  "cache_control": {
                                                                    "nullable": true
                                                                  }
                                                                },
                                                                "required": [
                                                                  "type",
                                                                  "source"
                                                                ],
                                                                "additionalProperties": false,
                                                                "description": "Anthropic Messages API request `DocumentBlockParam`. This models a user `content` item with `type: \"document\"` and supports the source union exposed by Anthropic: `Base64PDFSource | PlainTextSource | ContentBlockSource | URLPDFSource`. API reference: https://platform.claude.com/docs/en/api/messages#document_block_param"
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    },
                                                    "is_error": {
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "tool_use_id",
                                                    "type"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "search_result",
                                                        "server_tool_use",
                                                        "web_search_tool_result",
                                                        "web_fetch_tool_result",
                                                        "code_execution_tool_result",
                                                        "bash_code_execution_tool_result",
                                                        "text_editor_code_execution_tool_result",
                                                        "tool_search_tool_result",
                                                        "container_upload"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": {}
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": {}
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      },
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "user",
                                          "assistant",
                                          "system"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "content",
                                      "role"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "max_tokens": {
                                  "type": "number"
                                },
                                "container": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "context_management": {
                                  "nullable": true,
                                  "type": "object",
                                  "properties": {},
                                  "additionalProperties": false
                                },
                                "mcp_servers": {
                                  "type": "array",
                                  "items": {}
                                },
                                "metadata": {
                                  "type": "object",
                                  "properties": {
                                    "user_id": {
                                      "nullable": true,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "user_id"
                                  ],
                                  "additionalProperties": false
                                },
                                "output_config": {
                                  "type": "object",
                                  "properties": {
                                    "effort": {
                                      "nullable": true,
                                      "type": "string"
                                    },
                                    "format": {
                                      "nullable": true,
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "json_schema"
                                          ]
                                        },
                                        "schema": {
                                          "type": "object",
                                          "additionalProperties": {}
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "schema"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "service_tier": {},
                                "speed": {
                                  "type": "string",
                                  "enum": [
                                    "fast",
                                    "standard"
                                  ]
                                },
                                "stop_sequences": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "stream": {
                                  "type": "boolean"
                                },
                                "system": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        },
                                        "cache_control": {
                                          "nullable": true
                                        },
                                        "citations": {
                                          "nullable": true,
                                          "type": "array",
                                          "items": {}
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          },
                                          "citations": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {}
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  ]
                                },
                                "temperature": {
                                  "type": "number"
                                },
                                "thinking": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "enabled"
                                          ]
                                        },
                                        "budget_tokens": {
                                          "type": "number"
                                        },
                                        "display": {
                                          "nullable": true,
                                          "type": "string",
                                          "enum": [
                                            "summarized",
                                            "omitted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "budget_tokens"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "disabled"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "adaptive"
                                          ]
                                        },
                                        "display": {
                                          "nullable": true,
                                          "type": "string",
                                          "enum": [
                                            "summarized",
                                            "omitted"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "tool_choice": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "auto"
                                          ]
                                        },
                                        "disable_parallel_tool_use": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "any"
                                          ]
                                        },
                                        "disable_parallel_tool_use": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "tool"
                                          ]
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "disable_parallel_tool_use": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "none"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "nullable": true,
                                            "type": "string",
                                            "enum": [
                                              "custom"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          },
                                          "input_schema": {
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "description": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "input_schema"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "bash"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "bash_20250124"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "str_replace_editor"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text_editor_20250124"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "str_replace_based_edit_tool"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text_editor_20250429"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "str_replace_based_edit_tool"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text_editor_20250728"
                                            ]
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          },
                                          "max_characters": {
                                            "nullable": true,
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "enum": [
                                              "web_search"
                                            ]
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "web_search_20250305"
                                            ]
                                          },
                                          "allowed_domains": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "blocked_domains": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "cache_control": {
                                            "nullable": true
                                          },
                                          "max_uses": {
                                            "nullable": true,
                                            "type": "number"
                                          },
                                          "user_location": {
                                            "nullable": true
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                },
                                "top_k": {
                                  "type": "number"
                                },
                                "top_p": {
                                  "type": "number"
                                },
                                "anthropic_version": {
                                  "type": "string"
                                },
                                "anthropic_beta": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "_isStreaming": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "messages",
                                "max_tokens"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/AnthropicMessagesResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "bedrock:invoke"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/CerebrasChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "cerebras:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/MistralChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "mistral:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PerplexityChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PerplexityChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PerplexityChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "perplexity:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/GroqChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "groq:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "xai:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OpenrouterChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OpenrouterChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OpenrouterChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "openrouter:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/VllmChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/VllmChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/VllmChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "vllm:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OllamaChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OllamaChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OllamaChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "ollama:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OllamaNativeChatRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OllamaNativeChatRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/OllamaNativeChatResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "ollama-native:chat"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/CohereChatRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/CohereChatRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/CohereChatResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "cohere:chat"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/ZhipuaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/ZhipuaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/ZhipuaiChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "zhipuai:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/DeepSeekChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/DeepSeekChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/DeepSeekChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "deepseek:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "developer"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "system"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "input_audio"
                                                          ]
                                                        },
                                                        "input_audio": {
                                                          "type": "object",
                                                          "properties": {
                                                            "data": {
                                                              "type": "string"
                                                            },
                                                            "format": {
                                                              "type": "string",
                                                              "enum": [
                                                                "wav",
                                                                "mp3"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "data",
                                                            "format"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "input_audio"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "file"
                                                          ]
                                                        },
                                                        "file": {
                                                          "type": "object",
                                                          "properties": {
                                                            "file_data": {
                                                              "type": "string"
                                                            },
                                                            "file_id": {
                                                              "type": "string"
                                                            },
                                                            "filename": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "file"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                    }
                                                  ],
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "audio": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "content": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                }
                                              }
                                            ]
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "tool"
                                            ]
                                          },
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    }
                                                  ]
                                                }
                                              }
                                            ]
                                          },
                                          "tool_call_id": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "tool_call_id"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "name"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                  }
                                },
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "parameters": {
                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "strict": {
                                                "nullable": true,
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false,
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "function"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "custom"
                                            ]
                                          },
                                          "custom": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "description": "The name of the custom tool, used to identify it in tool calls"
                                              },
                                              "description": {
                                                "description": "Optional description of the custom tool, used to provide more context",
                                                "type": "string"
                                              },
                                              "format": {
                                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "text"
                                                        ],
                                                        "description": "Unconstrained text format. Always `text`"
                                                      }
                                                    },
                                                    "required": [
                                                      "type"
                                                    ],
                                                    "additionalProperties": false,
                                                    "description": "Unconstrained free-form text"
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "grammar"
                                                        ]
                                                      },
                                                      "grammar": {
                                                        "type": "object",
                                                        "properties": {
                                                          "definition": {
                                                            "type": "string",
                                                            "description": "The grammar definition"
                                                          },
                                                          "syntax": {
                                                            "type": "string",
                                                            "enum": [
                                                              "lark",
                                                              "regex"
                                                            ],
                                                            "description": "The syntax of the grammar definition"
                                                          }
                                                        },
                                                        "required": [
                                                          "definition",
                                                          "syntax"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Your chosen grammar"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "grammar"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "custom"
                                        ],
                                        "additionalProperties": false,
                                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                      }
                                    ],
                                    "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                  }
                                },
                                "tool_choice": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "auto",
                                        "required"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "allowed_tools"
                                          ]
                                        },
                                        "allowed_tools": {
                                          "type": "object",
                                          "properties": {
                                            "mode": {
                                              "type": "string",
                                              "enum": [
                                                "auto",
                                                "required"
                                              ],
                                              "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                            },
                                            "tools": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "description": {
                                                          "type": "string"
                                                        },
                                                        "parameters": {
                                                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        },
                                                        "strict": {
                                                          "nullable": true,
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                }
                                              },
                                              "description": "A list of tool definitions that the model should be allowed to call"
                                            }
                                          },
                                          "required": [
                                            "mode",
                                            "tools"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "allowed_tools"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "description": "The name of the custom tool, used to identify it in tool calls"
                                            },
                                            "description": {
                                              "description": "Optional description of the custom tool, used to provide more context",
                                              "type": "string"
                                            },
                                            "format": {
                                              "description": "The input format for the custom tool. Default is unconstrained text.",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ],
                                                      "description": "Unconstrained text format. Always `text`"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "Unconstrained free-form text"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "grammar"
                                                      ]
                                                    },
                                                    "grammar": {
                                                      "type": "object",
                                                      "properties": {
                                                        "definition": {
                                                          "type": "string",
                                                          "description": "The grammar definition"
                                                        },
                                                        "syntax": {
                                                          "type": "string",
                                                          "enum": [
                                                            "lark",
                                                            "regex"
                                                          ],
                                                          "description": "The syntax of the grammar definition"
                                                        }
                                                      },
                                                      "required": [
                                                        "definition",
                                                        "syntax"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "Your chosen grammar"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "grammar"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_completion_tokens": {
                                  "nullable": true,
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "maximum": 9007199254740991
                                },
                                "reasoning_effort": {
                                  "nullable": true,
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "minimal",
                                    "low",
                                    "medium",
                                    "high",
                                    "xhigh"
                                  ]
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "model",
                                "messages"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "developer"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "system"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "input_audio"
                                                          ]
                                                        },
                                                        "input_audio": {
                                                          "type": "object",
                                                          "properties": {
                                                            "data": {
                                                              "type": "string"
                                                            },
                                                            "format": {
                                                              "type": "string",
                                                              "enum": [
                                                                "wav",
                                                                "mp3"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "data",
                                                            "format"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "input_audio"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "file"
                                                          ]
                                                        },
                                                        "file": {
                                                          "type": "object",
                                                          "properties": {
                                                            "file_data": {
                                                              "type": "string"
                                                            },
                                                            "file_id": {
                                                              "type": "string"
                                                            },
                                                            "filename": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "file"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                    }
                                                  ],
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "audio": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "content": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                }
                                              }
                                            ]
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "tool"
                                            ]
                                          },
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    }
                                                  ]
                                                }
                                              }
                                            ]
                                          },
                                          "tool_call_id": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "tool_call_id"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "name"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                  }
                                },
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "parameters": {
                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "strict": {
                                                "nullable": true,
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false,
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "function"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "custom"
                                            ]
                                          },
                                          "custom": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "description": "The name of the custom tool, used to identify it in tool calls"
                                              },
                                              "description": {
                                                "description": "Optional description of the custom tool, used to provide more context",
                                                "type": "string"
                                              },
                                              "format": {
                                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "text"
                                                        ],
                                                        "description": "Unconstrained text format. Always `text`"
                                                      }
                                                    },
                                                    "required": [
                                                      "type"
                                                    ],
                                                    "additionalProperties": false,
                                                    "description": "Unconstrained free-form text"
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "grammar"
                                                        ]
                                                      },
                                                      "grammar": {
                                                        "type": "object",
                                                        "properties": {
                                                          "definition": {
                                                            "type": "string",
                                                            "description": "The grammar definition"
                                                          },
                                                          "syntax": {
                                                            "type": "string",
                                                            "enum": [
                                                              "lark",
                                                              "regex"
                                                            ],
                                                            "description": "The syntax of the grammar definition"
                                                          }
                                                        },
                                                        "required": [
                                                          "definition",
                                                          "syntax"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Your chosen grammar"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "grammar"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "custom"
                                        ],
                                        "additionalProperties": false,
                                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                      }
                                    ],
                                    "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                  }
                                },
                                "tool_choice": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "auto",
                                        "required"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "allowed_tools"
                                          ]
                                        },
                                        "allowed_tools": {
                                          "type": "object",
                                          "properties": {
                                            "mode": {
                                              "type": "string",
                                              "enum": [
                                                "auto",
                                                "required"
                                              ],
                                              "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                            },
                                            "tools": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "description": {
                                                          "type": "string"
                                                        },
                                                        "parameters": {
                                                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        },
                                                        "strict": {
                                                          "nullable": true,
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                }
                                              },
                                              "description": "A list of tool definitions that the model should be allowed to call"
                                            }
                                          },
                                          "required": [
                                            "mode",
                                            "tools"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "allowed_tools"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "description": "The name of the custom tool, used to identify it in tool calls"
                                            },
                                            "description": {
                                              "description": "Optional description of the custom tool, used to provide more context",
                                              "type": "string"
                                            },
                                            "format": {
                                              "description": "The input format for the custom tool. Default is unconstrained text.",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ],
                                                      "description": "Unconstrained text format. Always `text`"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "Unconstrained free-form text"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "grammar"
                                                      ]
                                                    },
                                                    "grammar": {
                                                      "type": "object",
                                                      "properties": {
                                                        "definition": {
                                                          "type": "string",
                                                          "description": "The grammar definition"
                                                        },
                                                        "syntax": {
                                                          "type": "string",
                                                          "enum": [
                                                            "lark",
                                                            "regex"
                                                          ],
                                                          "description": "The syntax of the grammar definition"
                                                        }
                                                      },
                                                      "required": [
                                                        "definition",
                                                        "syntax"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "Your chosen grammar"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "grammar"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_completion_tokens": {
                                  "nullable": true,
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "maximum": 9007199254740991
                                },
                                "reasoning_effort": {
                                  "nullable": true,
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "minimal",
                                    "low",
                                    "medium",
                                    "high",
                                    "xhigh"
                                  ]
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "model",
                                "messages"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "choices": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "finish_reason": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "tool_calls",
                                              "content_filter",
                                              "function_call"
                                            ]
                                          },
                                          {
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "index": {
                                        "type": "number"
                                      },
                                      "logprobs": {
                                        "nullable": true
                                      },
                                      "message": {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "annotations": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {}
                                          },
                                          "audio": {
                                            "nullable": true
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                                      }
                                    },
                                    "required": [
                                      "finish_reason",
                                      "logprobs",
                                      "message"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                                  }
                                },
                                "created": {
                                  "type": "number"
                                },
                                "model": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "chat.completion"
                                  ]
                                },
                                "server_tier": {
                                  "type": "string"
                                },
                                "system_fingerprint": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "completion_tokens": {
                                      "type": "number"
                                    },
                                    "prompt_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    },
                                    "completion_tokens_details": {
                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                                    },
                                    "prompt_tokens_details": {
                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                                    }
                                  },
                                  "required": [
                                    "completion_tokens",
                                    "prompt_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": false,
                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                                }
                              },
                              "required": [
                                "id",
                                "choices",
                                "created",
                                "model",
                                "object"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "kimi:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "developer"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "system"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "input_audio"
                                                          ]
                                                        },
                                                        "input_audio": {
                                                          "type": "object",
                                                          "properties": {
                                                            "data": {
                                                              "type": "string"
                                                            },
                                                            "format": {
                                                              "type": "string",
                                                              "enum": [
                                                                "wav",
                                                                "mp3"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "data",
                                                            "format"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "input_audio"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "file"
                                                          ]
                                                        },
                                                        "file": {
                                                          "type": "object",
                                                          "properties": {
                                                            "file_data": {
                                                              "type": "string"
                                                            },
                                                            "file_id": {
                                                              "type": "string"
                                                            },
                                                            "filename": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "file"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                    }
                                                  ],
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "audio": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "content": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                }
                                              }
                                            ]
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "tool"
                                            ]
                                          },
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    }
                                                  ]
                                                }
                                              }
                                            ]
                                          },
                                          "tool_call_id": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "tool_call_id"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "name"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                  }
                                },
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "parameters": {
                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "strict": {
                                                "nullable": true,
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false,
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "function"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "custom"
                                            ]
                                          },
                                          "custom": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "description": "The name of the custom tool, used to identify it in tool calls"
                                              },
                                              "description": {
                                                "description": "Optional description of the custom tool, used to provide more context",
                                                "type": "string"
                                              },
                                              "format": {
                                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "text"
                                                        ],
                                                        "description": "Unconstrained text format. Always `text`"
                                                      }
                                                    },
                                                    "required": [
                                                      "type"
                                                    ],
                                                    "additionalProperties": false,
                                                    "description": "Unconstrained free-form text"
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "grammar"
                                                        ]
                                                      },
                                                      "grammar": {
                                                        "type": "object",
                                                        "properties": {
                                                          "definition": {
                                                            "type": "string",
                                                            "description": "The grammar definition"
                                                          },
                                                          "syntax": {
                                                            "type": "string",
                                                            "enum": [
                                                              "lark",
                                                              "regex"
                                                            ],
                                                            "description": "The syntax of the grammar definition"
                                                          }
                                                        },
                                                        "required": [
                                                          "definition",
                                                          "syntax"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Your chosen grammar"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "grammar"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "custom"
                                        ],
                                        "additionalProperties": false,
                                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                      }
                                    ],
                                    "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                  }
                                },
                                "tool_choice": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "auto",
                                        "required"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "allowed_tools"
                                          ]
                                        },
                                        "allowed_tools": {
                                          "type": "object",
                                          "properties": {
                                            "mode": {
                                              "type": "string",
                                              "enum": [
                                                "auto",
                                                "required"
                                              ],
                                              "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                            },
                                            "tools": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "description": {
                                                          "type": "string"
                                                        },
                                                        "parameters": {
                                                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        },
                                                        "strict": {
                                                          "nullable": true,
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                }
                                              },
                                              "description": "A list of tool definitions that the model should be allowed to call"
                                            }
                                          },
                                          "required": [
                                            "mode",
                                            "tools"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "allowed_tools"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "description": "The name of the custom tool, used to identify it in tool calls"
                                            },
                                            "description": {
                                              "description": "Optional description of the custom tool, used to provide more context",
                                              "type": "string"
                                            },
                                            "format": {
                                              "description": "The input format for the custom tool. Default is unconstrained text.",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ],
                                                      "description": "Unconstrained text format. Always `text`"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "Unconstrained free-form text"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "grammar"
                                                      ]
                                                    },
                                                    "grammar": {
                                                      "type": "object",
                                                      "properties": {
                                                        "definition": {
                                                          "type": "string",
                                                          "description": "The grammar definition"
                                                        },
                                                        "syntax": {
                                                          "type": "string",
                                                          "enum": [
                                                            "lark",
                                                            "regex"
                                                          ],
                                                          "description": "The syntax of the grammar definition"
                                                        }
                                                      },
                                                      "required": [
                                                        "definition",
                                                        "syntax"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "Your chosen grammar"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "grammar"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_completion_tokens": {
                                  "nullable": true,
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "maximum": 9007199254740991
                                },
                                "reasoning_effort": {
                                  "nullable": true,
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "minimal",
                                    "low",
                                    "medium",
                                    "high",
                                    "xhigh"
                                  ]
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "model",
                                "messages"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "developer"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "system"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "input_audio"
                                                          ]
                                                        },
                                                        "input_audio": {
                                                          "type": "object",
                                                          "properties": {
                                                            "data": {
                                                              "type": "string"
                                                            },
                                                            "format": {
                                                              "type": "string",
                                                              "enum": [
                                                                "wav",
                                                                "mp3"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "data",
                                                            "format"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "input_audio"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "file"
                                                          ]
                                                        },
                                                        "file": {
                                                          "type": "object",
                                                          "properties": {
                                                            "file_data": {
                                                              "type": "string"
                                                            },
                                                            "file_id": {
                                                              "type": "string"
                                                            },
                                                            "filename": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "file"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                    }
                                                  ],
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "audio": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "content": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                }
                                              }
                                            ]
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "tool"
                                            ]
                                          },
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    }
                                                  ]
                                                }
                                              }
                                            ]
                                          },
                                          "tool_call_id": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "tool_call_id"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "name"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                  }
                                },
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "parameters": {
                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "strict": {
                                                "nullable": true,
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false,
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "function"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "custom"
                                            ]
                                          },
                                          "custom": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "description": "The name of the custom tool, used to identify it in tool calls"
                                              },
                                              "description": {
                                                "description": "Optional description of the custom tool, used to provide more context",
                                                "type": "string"
                                              },
                                              "format": {
                                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "text"
                                                        ],
                                                        "description": "Unconstrained text format. Always `text`"
                                                      }
                                                    },
                                                    "required": [
                                                      "type"
                                                    ],
                                                    "additionalProperties": false,
                                                    "description": "Unconstrained free-form text"
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "grammar"
                                                        ]
                                                      },
                                                      "grammar": {
                                                        "type": "object",
                                                        "properties": {
                                                          "definition": {
                                                            "type": "string",
                                                            "description": "The grammar definition"
                                                          },
                                                          "syntax": {
                                                            "type": "string",
                                                            "enum": [
                                                              "lark",
                                                              "regex"
                                                            ],
                                                            "description": "The syntax of the grammar definition"
                                                          }
                                                        },
                                                        "required": [
                                                          "definition",
                                                          "syntax"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Your chosen grammar"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "grammar"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "custom"
                                        ],
                                        "additionalProperties": false,
                                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                      }
                                    ],
                                    "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                  }
                                },
                                "tool_choice": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "auto",
                                        "required"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "allowed_tools"
                                          ]
                                        },
                                        "allowed_tools": {
                                          "type": "object",
                                          "properties": {
                                            "mode": {
                                              "type": "string",
                                              "enum": [
                                                "auto",
                                                "required"
                                              ],
                                              "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                            },
                                            "tools": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "description": {
                                                          "type": "string"
                                                        },
                                                        "parameters": {
                                                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        },
                                                        "strict": {
                                                          "nullable": true,
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                }
                                              },
                                              "description": "A list of tool definitions that the model should be allowed to call"
                                            }
                                          },
                                          "required": [
                                            "mode",
                                            "tools"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "allowed_tools"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "description": "The name of the custom tool, used to identify it in tool calls"
                                            },
                                            "description": {
                                              "description": "Optional description of the custom tool, used to provide more context",
                                              "type": "string"
                                            },
                                            "format": {
                                              "description": "The input format for the custom tool. Default is unconstrained text.",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ],
                                                      "description": "Unconstrained text format. Always `text`"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "Unconstrained free-form text"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "grammar"
                                                      ]
                                                    },
                                                    "grammar": {
                                                      "type": "object",
                                                      "properties": {
                                                        "definition": {
                                                          "type": "string",
                                                          "description": "The grammar definition"
                                                        },
                                                        "syntax": {
                                                          "type": "string",
                                                          "enum": [
                                                            "lark",
                                                            "regex"
                                                          ],
                                                          "description": "The syntax of the grammar definition"
                                                        }
                                                      },
                                                      "required": [
                                                        "definition",
                                                        "syntax"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "Your chosen grammar"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "grammar"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_completion_tokens": {
                                  "nullable": true,
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "maximum": 9007199254740991
                                },
                                "reasoning_effort": {
                                  "nullable": true,
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "minimal",
                                    "low",
                                    "medium",
                                    "high",
                                    "xhigh"
                                  ]
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "model",
                                "messages"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "choices": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "finish_reason": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "tool_calls",
                                              "content_filter",
                                              "function_call"
                                            ]
                                          },
                                          {
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "index": {
                                        "type": "number"
                                      },
                                      "logprobs": {
                                        "nullable": true
                                      },
                                      "message": {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "annotations": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {}
                                          },
                                          "audio": {
                                            "nullable": true
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                                      }
                                    },
                                    "required": [
                                      "finish_reason",
                                      "logprobs",
                                      "message"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                                  }
                                },
                                "created": {
                                  "type": "number"
                                },
                                "model": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string"
                                },
                                "server_tier": {
                                  "type": "string"
                                },
                                "system_fingerprint": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "completion_tokens": {
                                      "type": "number"
                                    },
                                    "prompt_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    },
                                    "completion_tokens_details": {
                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                                    },
                                    "prompt_tokens_details": {
                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                                    }
                                  },
                                  "required": [
                                    "completion_tokens",
                                    "prompt_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": false,
                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                                }
                              },
                              "required": [
                                "id",
                                "choices",
                                "model"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "github-copilot:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "developer"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "system"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "input_audio"
                                                          ]
                                                        },
                                                        "input_audio": {
                                                          "type": "object",
                                                          "properties": {
                                                            "data": {
                                                              "type": "string"
                                                            },
                                                            "format": {
                                                              "type": "string",
                                                              "enum": [
                                                                "wav",
                                                                "mp3"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "data",
                                                            "format"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "input_audio"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "file"
                                                          ]
                                                        },
                                                        "file": {
                                                          "type": "object",
                                                          "properties": {
                                                            "file_data": {
                                                              "type": "string"
                                                            },
                                                            "file_id": {
                                                              "type": "string"
                                                            },
                                                            "filename": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "file"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                    }
                                                  ],
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "audio": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "content": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                }
                                              }
                                            ]
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "tool"
                                            ]
                                          },
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    }
                                                  ]
                                                }
                                              }
                                            ]
                                          },
                                          "tool_call_id": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "tool_call_id"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "name"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                  }
                                },
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "parameters": {
                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "strict": {
                                                "nullable": true,
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false,
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "function"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "custom"
                                            ]
                                          },
                                          "custom": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "description": "The name of the custom tool, used to identify it in tool calls"
                                              },
                                              "description": {
                                                "description": "Optional description of the custom tool, used to provide more context",
                                                "type": "string"
                                              },
                                              "format": {
                                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "text"
                                                        ],
                                                        "description": "Unconstrained text format. Always `text`"
                                                      }
                                                    },
                                                    "required": [
                                                      "type"
                                                    ],
                                                    "additionalProperties": false,
                                                    "description": "Unconstrained free-form text"
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "grammar"
                                                        ]
                                                      },
                                                      "grammar": {
                                                        "type": "object",
                                                        "properties": {
                                                          "definition": {
                                                            "type": "string",
                                                            "description": "The grammar definition"
                                                          },
                                                          "syntax": {
                                                            "type": "string",
                                                            "enum": [
                                                              "lark",
                                                              "regex"
                                                            ],
                                                            "description": "The syntax of the grammar definition"
                                                          }
                                                        },
                                                        "required": [
                                                          "definition",
                                                          "syntax"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Your chosen grammar"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "grammar"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "custom"
                                        ],
                                        "additionalProperties": false,
                                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                      }
                                    ],
                                    "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                  }
                                },
                                "tool_choice": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "auto",
                                        "required"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "allowed_tools"
                                          ]
                                        },
                                        "allowed_tools": {
                                          "type": "object",
                                          "properties": {
                                            "mode": {
                                              "type": "string",
                                              "enum": [
                                                "auto",
                                                "required"
                                              ],
                                              "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                            },
                                            "tools": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "description": {
                                                          "type": "string"
                                                        },
                                                        "parameters": {
                                                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        },
                                                        "strict": {
                                                          "nullable": true,
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                }
                                              },
                                              "description": "A list of tool definitions that the model should be allowed to call"
                                            }
                                          },
                                          "required": [
                                            "mode",
                                            "tools"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "allowed_tools"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "description": "The name of the custom tool, used to identify it in tool calls"
                                            },
                                            "description": {
                                              "description": "Optional description of the custom tool, used to provide more context",
                                              "type": "string"
                                            },
                                            "format": {
                                              "description": "The input format for the custom tool. Default is unconstrained text.",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ],
                                                      "description": "Unconstrained text format. Always `text`"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "Unconstrained free-form text"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "grammar"
                                                      ]
                                                    },
                                                    "grammar": {
                                                      "type": "object",
                                                      "properties": {
                                                        "definition": {
                                                          "type": "string",
                                                          "description": "The grammar definition"
                                                        },
                                                        "syntax": {
                                                          "type": "string",
                                                          "enum": [
                                                            "lark",
                                                            "regex"
                                                          ],
                                                          "description": "The syntax of the grammar definition"
                                                        }
                                                      },
                                                      "required": [
                                                        "definition",
                                                        "syntax"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "Your chosen grammar"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "grammar"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_completion_tokens": {
                                  "nullable": true,
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "maximum": 9007199254740991
                                },
                                "reasoning_effort": {
                                  "nullable": true,
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "minimal",
                                    "low",
                                    "medium",
                                    "high",
                                    "xhigh"
                                  ]
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "model",
                                "messages"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "messages": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "developer"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "system"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "input_audio"
                                                          ]
                                                        },
                                                        "input_audio": {
                                                          "type": "object",
                                                          "properties": {
                                                            "data": {
                                                              "type": "string"
                                                            },
                                                            "format": {
                                                              "type": "string",
                                                              "enum": [
                                                                "wav",
                                                                "mp3"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "data",
                                                            "format"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "input_audio"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "file"
                                                          ]
                                                        },
                                                        "file": {
                                                          "type": "object",
                                                          "properties": {
                                                            "file_data": {
                                                              "type": "string"
                                                            },
                                                            "file_id": {
                                                              "type": "string"
                                                            },
                                                            "filename": {
                                                              "type": "string"
                                                            }
                                                          },
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "file"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                                    }
                                                  ],
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                                }
                                              }
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "user"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "content",
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "audio": {
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "id"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "content": {
                                            "nullable": true,
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                }
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                                }
                                              }
                                            ]
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "tool"
                                            ]
                                          },
                                          "content": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "text"
                                                          ]
                                                        },
                                                        "text": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "text"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "enum": [
                                                            "image_url"
                                                          ]
                                                        },
                                                        "image_url": {
                                                          "type": "object",
                                                          "properties": {
                                                            "url": {
                                                              "type": "string"
                                                            },
                                                            "detail": {
                                                              "type": "string",
                                                              "enum": [
                                                                "auto",
                                                                "low",
                                                                "high"
                                                              ]
                                                            }
                                                          },
                                                          "required": [
                                                            "url"
                                                          ],
                                                          "additionalProperties": false,
                                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "image_url"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                                    }
                                                  ]
                                                }
                                              }
                                            ]
                                          },
                                          "tool_call_id": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "tool_call_id"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "role",
                                          "content",
                                          "name"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                                  }
                                },
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "function": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "parameters": {
                                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                "type": "object",
                                                "additionalProperties": {}
                                              },
                                              "strict": {
                                                "nullable": true,
                                                "type": "boolean"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false,
                                            "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "function"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "custom"
                                            ]
                                          },
                                          "custom": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "description": "The name of the custom tool, used to identify it in tool calls"
                                              },
                                              "description": {
                                                "description": "Optional description of the custom tool, used to provide more context",
                                                "type": "string"
                                              },
                                              "format": {
                                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                                "anyOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "text"
                                                        ],
                                                        "description": "Unconstrained text format. Always `text`"
                                                      }
                                                    },
                                                    "required": [
                                                      "type"
                                                    ],
                                                    "additionalProperties": false,
                                                    "description": "Unconstrained free-form text"
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string",
                                                        "enum": [
                                                          "grammar"
                                                        ]
                                                      },
                                                      "grammar": {
                                                        "type": "object",
                                                        "properties": {
                                                          "definition": {
                                                            "type": "string",
                                                            "description": "The grammar definition"
                                                          },
                                                          "syntax": {
                                                            "type": "string",
                                                            "enum": [
                                                              "lark",
                                                              "regex"
                                                            ],
                                                            "description": "The syntax of the grammar definition"
                                                          }
                                                        },
                                                        "required": [
                                                          "definition",
                                                          "syntax"
                                                        ],
                                                        "additionalProperties": false,
                                                        "description": "Your chosen grammar"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "grammar"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "custom"
                                        ],
                                        "additionalProperties": false,
                                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                      }
                                    ],
                                    "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                                  }
                                },
                                "tool_choice": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "auto",
                                        "required"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "allowed_tools"
                                          ]
                                        },
                                        "allowed_tools": {
                                          "type": "object",
                                          "properties": {
                                            "mode": {
                                              "type": "string",
                                              "enum": [
                                                "auto",
                                                "required"
                                              ],
                                              "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                                            },
                                            "tools": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "additionalProperties": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "name": {
                                                          "type": "string"
                                                        },
                                                        "description": {
                                                          "type": "string"
                                                        },
                                                        "parameters": {
                                                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                                          "type": "object",
                                                          "additionalProperties": {}
                                                        },
                                                        "strict": {
                                                          "nullable": true,
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                                }
                                              },
                                              "description": "A list of tool definitions that the model should be allowed to call"
                                            }
                                          },
                                          "required": [
                                            "mode",
                                            "tools"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "allowed_tools"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "description": "The name of the custom tool, used to identify it in tool calls"
                                            },
                                            "description": {
                                              "description": "Optional description of the custom tool, used to provide more context",
                                              "type": "string"
                                            },
                                            "format": {
                                              "description": "The input format for the custom tool. Default is unconstrained text.",
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "text"
                                                      ],
                                                      "description": "Unconstrained text format. Always `text`"
                                                    }
                                                  },
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "Unconstrained free-form text"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "grammar"
                                                      ]
                                                    },
                                                    "grammar": {
                                                      "type": "object",
                                                      "properties": {
                                                        "definition": {
                                                          "type": "string",
                                                          "description": "The grammar definition"
                                                        },
                                                        "syntax": {
                                                          "type": "string",
                                                          "enum": [
                                                            "lark",
                                                            "regex"
                                                          ],
                                                          "description": "The syntax of the grammar definition"
                                                        }
                                                      },
                                                      "required": [
                                                        "definition",
                                                        "syntax"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "Your chosen grammar"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "grammar"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "max_completion_tokens": {
                                  "nullable": true,
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "maximum": 9007199254740991
                                },
                                "reasoning_effort": {
                                  "nullable": true,
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "minimal",
                                    "low",
                                    "medium",
                                    "high",
                                    "xhigh"
                                  ]
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "model",
                                "messages"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "choices": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "finish_reason": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "tool_calls",
                                              "content_filter",
                                              "function_call"
                                            ]
                                          },
                                          {
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "index": {
                                        "type": "number"
                                      },
                                      "logprobs": {
                                        "nullable": true
                                      },
                                      "message": {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "annotations": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {}
                                          },
                                          "audio": {
                                            "nullable": true
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                                      }
                                    },
                                    "required": [
                                      "finish_reason",
                                      "logprobs",
                                      "message"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                                  }
                                },
                                "created": {
                                  "type": "number"
                                },
                                "model": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "chat.completion"
                                  ]
                                },
                                "server_tier": {
                                  "type": "string"
                                },
                                "system_fingerprint": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "completion_tokens": {
                                      "type": "number"
                                    },
                                    "prompt_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    },
                                    "completion_tokens_details": {
                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                                    },
                                    "prompt_tokens_details": {
                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                                    }
                                  },
                                  "required": [
                                    "completion_tokens",
                                    "prompt_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": false,
                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                                }
                              },
                              "required": [
                                "id",
                                "choices",
                                "created",
                                "model",
                                "object"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "microsoft-365-copilot:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/MinimaxChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/MinimaxChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/MinimaxChatCompletionResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "minimax:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/XaiChatCompletionRequest"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "choices": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "finish_reason": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "stop",
                                              "length",
                                              "tool_calls",
                                              "content_filter",
                                              "function_call"
                                            ]
                                          },
                                          {
                                            "type": "string"
                                          }
                                        ]
                                      },
                                      "index": {
                                        "type": "number"
                                      },
                                      "logprobs": {
                                        "nullable": true
                                      },
                                      "message": {
                                        "type": "object",
                                        "properties": {
                                          "content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "refusal": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "annotations": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {}
                                          },
                                          "audio": {
                                            "nullable": true
                                          },
                                          "function_call": {
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                            "nullable": true,
                                            "type": "object",
                                            "properties": {
                                              "arguments": {
                                                "type": "string"
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "arguments",
                                              "name"
                                            ],
                                            "additionalProperties": false
                                          },
                                          "reasoning_content": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "tool_calls": {
                                            "nullable": true,
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "function"
                                                      ]
                                                    },
                                                    "function": {
                                                      "type": "object",
                                                      "properties": {
                                                        "arguments": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "arguments",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "function"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "custom"
                                                      ]
                                                    },
                                                    "custom": {
                                                      "type": "object",
                                                      "properties": {
                                                        "input": {
                                                          "type": "string"
                                                        },
                                                        "name": {
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "input",
                                                        "name"
                                                      ],
                                                      "additionalProperties": false,
                                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "type",
                                                    "custom"
                                                  ],
                                                  "additionalProperties": false,
                                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                                }
                                              ],
                                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                            }
                                          }
                                        },
                                        "required": [
                                          "role"
                                        ],
                                        "additionalProperties": false,
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                                      }
                                    },
                                    "required": [
                                      "finish_reason",
                                      "logprobs",
                                      "message"
                                    ],
                                    "additionalProperties": false,
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                                  }
                                },
                                "created": {
                                  "type": "number"
                                },
                                "model": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "chat.completion"
                                  ]
                                },
                                "server_tier": {
                                  "type": "string"
                                },
                                "system_fingerprint": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "completion_tokens": {
                                      "type": "number"
                                    },
                                    "prompt_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    },
                                    "completion_tokens_details": {
                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                                    },
                                    "prompt_tokens_details": {
                                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                                    }
                                  },
                                  "required": [
                                    "completion_tokens",
                                    "prompt_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": false,
                                  "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                                }
                              },
                              "required": [
                                "id",
                                "choices",
                                "created",
                                "model",
                                "object"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "azure:chatCompletions"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    }
                                  ]
                                },
                                "instructions": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "max_output_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "metadata": {
                                  "nullable": true,
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "previous_response_id": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "text": {},
                                "tool_choice": {},
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "nullable": true,
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "name"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    ]
                                  }
                                },
                                "top_p": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "user": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    }
                                  ]
                                },
                                "instructions": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "max_output_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "metadata": {
                                  "nullable": true,
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "previous_response_id": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "text": {},
                                "tool_choice": {},
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "nullable": true,
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "name"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    ]
                                  }
                                },
                                "top_p": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "user": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "response"
                                  ]
                                },
                                "created_at": {
                                  "type": "number"
                                },
                                "model": {
                                  "type": "string"
                                },
                                "output": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "message"
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "status": {
                                            "type": "string"
                                          },
                                          "content": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "output_text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": {},
                                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": {},
                                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                                }
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "type",
                                          "role",
                                          "status",
                                          "content"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function_call"
                                            ]
                                          },
                                          "id": {
                                            "type": "string"
                                          },
                                          "call_id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "status": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "call_id",
                                          "name",
                                          "arguments"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "input_tokens": {
                                      "type": "number"
                                    },
                                    "output_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "input_tokens",
                                    "output_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": {},
                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                                }
                              },
                              "required": [
                                "id",
                                "object",
                                "created_at",
                                "model",
                                "output",
                                "status"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "azure:responses"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    }
                                  ]
                                },
                                "instructions": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "max_output_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "metadata": {
                                  "nullable": true,
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "previous_response_id": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "text": {},
                                "tool_choice": {},
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "nullable": true,
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "name"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    ]
                                  }
                                },
                                "top_p": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "user": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    }
                                  ]
                                },
                                "instructions": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "max_output_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "metadata": {
                                  "nullable": true,
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "previous_response_id": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "text": {},
                                "tool_choice": {},
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "nullable": true,
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "name"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    ]
                                  }
                                },
                                "top_p": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "user": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string",
                                  "enum": [
                                    "response"
                                  ]
                                },
                                "created_at": {
                                  "type": "number"
                                },
                                "model": {
                                  "type": "string"
                                },
                                "output": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "message"
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "status": {
                                            "type": "string"
                                          },
                                          "content": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "output_text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": {},
                                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": {},
                                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                                }
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "type",
                                          "role",
                                          "status",
                                          "content"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function_call"
                                            ]
                                          },
                                          "id": {
                                            "type": "string"
                                          },
                                          "call_id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "status": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "call_id",
                                          "name",
                                          "arguments"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "input_tokens": {
                                      "type": "number"
                                    },
                                    "output_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "input_tokens",
                                    "output_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": {},
                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                                }
                              },
                              "required": [
                                "id",
                                "object",
                                "created_at",
                                "model",
                                "output",
                                "status"
                              ],
                              "additionalProperties": {},
                              "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "perplexity:responses"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "profileId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "externalAgentId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "executionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "userId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "virtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "passthroughVirtualKeyId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "environmentId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "connectorId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sessionId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sessionSource": {
                          "nullable": true,
                          "type": "string"
                        },
                        "source": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "api",
                            "model_router",
                            "chat",
                            "chat:compaction",
                            "a2a:compaction",
                            "chat:title_generation",
                            "chat:tool_call_repair",
                            "a2a:tool_call_repair",
                            "skill:description_generation",
                            "guardrail:dual_llm",
                            "chatops:slack",
                            "chatops:ms-teams",
                            "chatops:telegram",
                            "email",
                            "schedule-trigger",
                            "knowledge:embedding",
                            "knowledge:reranker",
                            "knowledge:query-expansion",
                            "knowledge:contextual-retrieval",
                            "app:llm_complete",
                            "app:recording_enhancement"
                          ]
                        },
                        "authMethod": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "provider_key",
                            "virtual_key",
                            "passthrough_virtual_key",
                            "jwks",
                            "oauth_client_credentials",
                            "oauth_user",
                            "internal",
                            "unknown"
                          ]
                        },
                        "billingMode": {
                          "type": "string",
                          "enum": [
                            "metered",
                            "subscription"
                          ]
                        },
                        "authenticatedAppId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "authenticatedAppName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "request": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    }
                                  ]
                                },
                                "instructions": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "max_output_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "metadata": {
                                  "nullable": true,
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "previous_response_id": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "text": {},
                                "tool_choice": {},
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "nullable": true,
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "name"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    ]
                                  }
                                },
                                "top_p": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "user": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "processedRequest": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "input": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    }
                                  ]
                                },
                                "instructions": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "max_output_tokens": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "metadata": {
                                  "nullable": true,
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "previous_response_id": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "stream": {
                                  "nullable": true,
                                  "type": "boolean"
                                },
                                "temperature": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "text": {},
                                "tool_choice": {},
                                "tools": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "nullable": true,
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "nullable": true,
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "name"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                                      }
                                    ]
                                  }
                                },
                                "top_p": {
                                  "nullable": true,
                                  "type": "number"
                                },
                                "user": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "model"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          ]
                        },
                        "response": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "object": {
                                  "type": "string"
                                },
                                "created_at": {
                                  "type": "number"
                                },
                                "model": {
                                  "type": "string"
                                },
                                "output": {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "message"
                                            ]
                                          },
                                          "role": {
                                            "type": "string",
                                            "enum": [
                                              "assistant"
                                            ]
                                          },
                                          "status": {
                                            "type": "string"
                                          },
                                          "content": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "output_text"
                                                      ]
                                                    },
                                                    "text": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "text"
                                                  ],
                                                  "additionalProperties": {},
                                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "enum": [
                                                        "refusal"
                                                      ]
                                                    },
                                                    "refusal": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "refusal"
                                                  ],
                                                  "additionalProperties": {},
                                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                                }
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "type",
                                          "role",
                                          "status",
                                          "content"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "function_call"
                                            ]
                                          },
                                          "id": {
                                            "type": "string"
                                          },
                                          "call_id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "status": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "call_id",
                                          "name",
                                          "arguments"
                                        ],
                                        "additionalProperties": {},
                                        "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": {}
                                      }
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string"
                                },
                                "usage": {
                                  "type": "object",
                                  "properties": {
                                    "input_tokens": {
                                      "type": "number"
                                    },
                                    "output_tokens": {
                                      "type": "number"
                                    },
                                    "total_tokens": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "input_tokens",
                                    "output_tokens",
                                    "total_tokens"
                                  ],
                                  "additionalProperties": {},
                                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                                }
                              },
                              "required": [
                                "id",
                                "model",
                                "output"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "error": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "error"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "__incognitoLocked": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "__incognitoLocked"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "__redacted": {
                                      "type": "string",
                                      "enum": [
                                        "incognito"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "__redacted"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          ]
                        },
                        "dualLlmAnalyses": {
                          "nullable": true,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "toolCallId": {
                                "type": "string"
                              },
                              "conversations": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "assistant"
                                      ]
                                    },
                                    "content": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "role",
                                    "content"
                                  ],
                                  "additionalProperties": false,
                                  "description": "Provider-agnostic transcript entry for the built-in Dual LLM workflow."
                                }
                              },
                              "result": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "toolCallId",
                              "conversations",
                              "result"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "unsafeContextBoundary": {
                          "nullable": true,
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "preexisting_untrusted"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tool_result"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "agent_configured_untrusted",
                                    "inherited_from_parent",
                                    "tool_result_marked_untrusted",
                                    "tool_result_blocked"
                                  ]
                                },
                                "toolCallId": {
                                  "type": "string"
                                },
                                "toolName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "reason",
                                "toolCallId",
                                "toolName"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "github-copilot:responses"
                          ]
                        },
                        "model": {
                          "nullable": true,
                          "type": "string"
                        },
                        "baselineModel": {
                          "nullable": true,
                          "type": "string"
                        },
                        "inputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "inputTokensEstimated": {
                          "type": "boolean"
                        },
                        "outputTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheReadTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWriteTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "cacheWrite1hTokens": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "baselineCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheCost": {
                          "nullable": true,
                          "type": "string"
                        },
                        "cacheSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonTokensBefore": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonTokensAfter": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "toonCostSavings": {
                          "nullable": true,
                          "type": "string"
                        },
                        "toonSkipReason": {
                          "nullable": true,
                          "type": "string",
                          "enum": [
                            "not_enabled",
                            "not_effective",
                            "no_tool_results"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "chatErrors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "conversationId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "rate_limit",
                                      "usage_limit_exceeded",
                                      "authentication",
                                      "permission_denied",
                                      "invalid_request",
                                      "provider_insufficient_balance",
                                      "not_found",
                                      "context_too_long",
                                      "request_too_large",
                                      "request_exceeds_rate_limit",
                                      "content_filtered",
                                      "server_error",
                                      "network_error",
                                      "empty_response",
                                      "incomplete_tool_call",
                                      "tool_call_output_truncated",
                                      "provider_auth_required",
                                      "tools_unsupported",
                                      "aborted",
                                      "unknown"
                                    ]
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "isRetryable": {
                                    "type": "boolean"
                                  },
                                  "sessionId": {
                                    "type": "string"
                                  },
                                  "traceId": {
                                    "type": "string"
                                  },
                                  "spanId": {
                                    "type": "string"
                                  },
                                  "usageLimitExceeded": {
                                    "type": "boolean"
                                  },
                                  "usageLimitEntityType": {
                                    "type": "string"
                                  },
                                  "authAction": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "providerLabel": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "providerLabel"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "originalError": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "openai",
                                          "gemini",
                                          "anthropic",
                                          "bedrock",
                                          "cohere",
                                          "cerebras",
                                          "mistral",
                                          "perplexity",
                                          "groq",
                                          "xai",
                                          "openrouter",
                                          "vllm",
                                          "ollama",
                                          "ollama-native",
                                          "zhipuai",
                                          "deepseek",
                                          "minimax",
                                          "kimi",
                                          "azure",
                                          "github-copilot",
                                          "microsoft-365-copilot",
                                          "archestra"
                                        ]
                                      },
                                      "status": {
                                        "type": "number"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "raw": {}
                                    },
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "isRetryable"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "conversationId",
                              "error",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "connectorName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "requestType": {
                          "type": "string",
                          "enum": [
                            "main",
                            "subagent"
                          ]
                        },
                        "externalAgentIdLabel": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "profileId",
                        "externalAgentId",
                        "executionId",
                        "userId",
                        "virtualKeyId",
                        "passthroughVirtualKeyId",
                        "environmentId",
                        "connectorId",
                        "sessionId",
                        "sessionSource",
                        "billingMode",
                        "authenticatedAppId",
                        "authenticatedAppName",
                        "request",
                        "response",
                        "type",
                        "model",
                        "baselineModel",
                        "inputTokens",
                        "inputTokensEstimated",
                        "outputTokens",
                        "cacheReadTokens",
                        "cacheWriteTokens",
                        "cacheWrite1hTokens",
                        "baselineCost",
                        "cost",
                        "cacheCost",
                        "cacheSavings",
                        "toonTokensBefore",
                        "toonTokensAfter",
                        "toonCostSavings",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "log:read"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog": {
      "get": {
        "operationId": "getInternalMcpCatalog",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Get all Internal MCP catalog items\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:read`: Browse the MCP server registry",
        "parameters": [
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "includeApps",
            "required": false
          },
          {
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by lifecycle status. `deleted` lists soft-deleted catalog items and requires the manage-deleted permission (granted to admins by default)."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "version": {
                        "nullable": true,
                        "type": "string"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "instructions": {
                        "nullable": true,
                        "type": "string"
                      },
                      "repository": {
                        "nullable": true,
                        "type": "string"
                      },
                      "installationCommand": {
                        "nullable": true,
                        "type": "string"
                      },
                      "requiresAuth": {
                        "type": "boolean"
                      },
                      "authDescription": {
                        "nullable": true,
                        "type": "string"
                      },
                      "authFields": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            },
                            "required": {
                              "default": false,
                              "type": "boolean"
                            },
                            "description": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "label",
                            "type",
                            "required"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "serverType": {
                        "type": "string",
                        "enum": [
                          "local",
                          "remote",
                          "builtin",
                          "app"
                        ]
                      },
                      "multitenant": {
                        "type": "boolean"
                      },
                      "deploymentName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "dynamicConnectionMcpServerId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "serverUrl": {
                        "nullable": true,
                        "type": "string"
                      },
                      "docsUrl": {
                        "nullable": true,
                        "type": "string"
                      },
                      "clientSecretId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "localConfigSecretId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "localConfig": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "command": {
                            "type": "string"
                          },
                          "arguments": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "environment": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "plain_text",
                                    "secret",
                                    "boolean",
                                    "number"
                                  ]
                                },
                                "value": {
                                  "type": "string"
                                },
                                "promptOnInstallation": {
                                  "type": "boolean"
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "default": {
                                  "allOf": [
                                    {
                                      "$ref": "#/components/schemas/LocalConfigEnvironmentDefault"
                                    }
                                  ]
                                },
                                "mounted": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "key",
                                "type",
                                "promptOnInstallation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "envFrom": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "secret",
                                    "configMap"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "prefix": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "dockerImage": {
                            "type": "string"
                          },
                          "serviceAccount": {
                            "type": "string"
                          },
                          "transportType": {
                            "type": "string",
                            "enum": [
                              "stdio",
                              "streamable-http"
                            ]
                          },
                          "httpPort": {
                            "type": "number"
                          },
                          "httpPath": {
                            "type": "string"
                          },
                          "nodePort": {
                            "type": "number"
                          },
                          "imagePullSecrets": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "source": {
                                          "type": "string",
                                          "enum": [
                                            "existing"
                                          ]
                                        },
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "source",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "source": {
                                          "type": "string",
                                          "enum": [
                                            "credentials"
                                          ]
                                        },
                                        "server": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "username": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "password": {
                                          "type": "string"
                                        },
                                        "email": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "source",
                                        "server",
                                        "username"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              ]
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "deploymentSpecYaml": {
                        "nullable": true,
                        "type": "string"
                      },
                      "userConfig": {
                        "nullable": true,
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/UserConfigField"
                        }
                      },
                      "oauthConfig": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "server_url": {
                            "type": "string"
                          },
                          "grant_type": {
                            "type": "string",
                            "enum": [
                              "authorization_code",
                              "client_credentials"
                            ]
                          },
                          "auth_server_url": {
                            "type": "string"
                          },
                          "authorization_endpoint": {
                            "type": "string"
                          },
                          "resource_metadata_url": {
                            "type": "string"
                          },
                          "client_id": {
                            "type": "string"
                          },
                          "client_secret": {
                            "type": "string"
                          },
                          "audience": {
                            "type": "string"
                          },
                          "resource": {
                            "type": "string"
                          },
                          "redirect_uris": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": {
                            "type": "string"
                          },
                          "well_known_url": {
                            "type": "string"
                          },
                          "default_scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "supports_resource_metadata": {
                            "type": "boolean"
                          },
                          "additional_scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "generic_oauth": {
                            "type": "boolean"
                          },
                          "token_endpoint": {
                            "type": "string"
                          },
                          "access_token_env_var": {
                            "type": "string",
                            "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                          },
                          "requires_proxy": {
                            "type": "boolean"
                          },
                          "provider_name": {
                            "type": "string"
                          },
                          "browser_auth": {
                            "type": "boolean"
                          },
                          "streamable_http_url": {
                            "type": "string"
                          },
                          "streamable_http_port": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "name",
                          "server_url",
                          "client_id",
                          "redirect_uris",
                          "scopes",
                          "default_scopes",
                          "supports_resource_metadata"
                        ],
                        "additionalProperties": false
                      },
                      "enterpriseManagedConfig": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "identityProviderId": {
                            "type": "string"
                          },
                          "assertionMode": {
                            "type": "string",
                            "enum": [
                              "exchange",
                              "passthrough"
                            ]
                          },
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "mcp",
                              "oauth_protected_resource",
                              "secret",
                              "service_account",
                              "custom_http"
                            ]
                          },
                          "resourceIdentifier": {
                            "type": "string"
                          },
                          "requestedIssuer": {
                            "type": "string"
                          },
                          "requestedCredentialType": {
                            "type": "string",
                            "enum": [
                              "id_jag",
                              "bearer_token",
                              "secret",
                              "service_account",
                              "opaque_json"
                            ]
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "audience": {
                            "type": "string"
                          },
                          "clientIdOverride": {
                            "type": "string"
                          },
                          "clientSecretOverride": {
                            "type": "string"
                          },
                          "tokenInjectionMode": {
                            "type": "string",
                            "enum": [
                              "authorization_bearer",
                              "raw_authorization",
                              "header",
                              "env",
                              "body_field"
                            ]
                          },
                          "headerName": {
                            "type": "string"
                          },
                          "envVarName": {
                            "type": "string"
                          },
                          "bodyFieldName": {
                            "type": "string"
                          },
                          "responseFieldPath": {
                            "type": "string"
                          },
                          "fallbackMode": {
                            "type": "string",
                            "enum": [
                              "fail_closed",
                              "fallback_to_dynamic",
                              "fallback_to_static"
                            ]
                          },
                          "cacheTtlSeconds": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "additionalProperties": false
                      },
                      "icon": {
                        "nullable": true,
                        "type": "string"
                      },
                      "organizationId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "authorId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ]
                      },
                      "clonedFrom": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "environmentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "catalogReinstallRequired": {
                        "type": "boolean"
                      },
                      "catalogItemApprovalStatus": {
                        "nullable": true,
                        "type": "string"
                      },
                      "catalogItemApprovalReason": {
                        "nullable": true,
                        "type": "string"
                      },
                      "catalogItemApprovalReviewedBy": {
                        "nullable": true,
                        "type": "string"
                      },
                      "catalogItemApprovalReviewedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "labels": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "key",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "teams": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "level": {
                              "type": "string",
                              "enum": [
                                "use",
                                "write"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "level"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "authorName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "toolCount": {
                        "default": 0,
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "providesUi": {
                        "type": "boolean"
                      },
                      "appId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "appEnabled": {
                        "nullable": true,
                        "type": "boolean"
                      },
                      "imageApprovalRequired": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "version",
                      "description",
                      "instructions",
                      "repository",
                      "installationCommand",
                      "requiresAuth",
                      "authDescription",
                      "authFields",
                      "serverType",
                      "multitenant",
                      "deploymentName",
                      "dynamicConnectionMcpServerId",
                      "serverUrl",
                      "docsUrl",
                      "clientSecretId",
                      "localConfigSecretId",
                      "localConfig",
                      "deploymentSpecYaml",
                      "userConfig",
                      "oauthConfig",
                      "enterpriseManagedConfig",
                      "icon",
                      "organizationId",
                      "authorId",
                      "scope",
                      "clonedFrom",
                      "environmentId",
                      "catalogReinstallRequired",
                      "catalogItemApprovalStatus",
                      "catalogItemApprovalReason",
                      "catalogItemApprovalReviewedBy",
                      "catalogItemApprovalReviewedAt",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "labels",
                      "teams",
                      "toolCount"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:read"
          ]
        }
      },
      "post": {
        "operationId": "createInternalMcpCatalogItem",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Create a new Internal MCP catalog item\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:create`: Add servers to the MCP registry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "nullable": true,
                    "type": "string"
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "repository": {
                    "nullable": true,
                    "type": "string"
                  },
                  "installationCommand": {
                    "nullable": true,
                    "type": "string"
                  },
                  "requiresAuth": {
                    "type": "boolean"
                  },
                  "authDescription": {
                    "nullable": true,
                    "type": "string"
                  },
                  "authFields": {
                    "nullable": true,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "required": {
                          "default": false,
                          "type": "boolean"
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "label",
                        "type"
                      ]
                    }
                  },
                  "serverType": {
                    "type": "string",
                    "enum": [
                      "local",
                      "remote",
                      "builtin",
                      "app"
                    ]
                  },
                  "multitenant": {
                    "type": "boolean"
                  },
                  "dynamicConnectionMcpServerId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "serverUrl": {
                    "nullable": true,
                    "type": "string"
                  },
                  "docsUrl": {
                    "nullable": true,
                    "type": "string"
                  },
                  "clientSecretId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "localConfigSecretId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "localConfig": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "arguments": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "environment": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "plain_text",
                                "secret",
                                "boolean",
                                "number"
                              ]
                            },
                            "value": {
                              "type": "string"
                            },
                            "promptOnInstallation": {
                              "type": "boolean"
                            },
                            "required": {
                              "type": "boolean"
                            },
                            "description": {
                              "type": "string"
                            },
                            "default": {
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/LocalConfigEnvironmentDefaultInput"
                                }
                              ]
                            },
                            "mounted": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "key",
                            "type",
                            "promptOnInstallation"
                          ]
                        }
                      },
                      "envFrom": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "secret",
                                "configMap"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "prefix": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ]
                        }
                      },
                      "dockerImage": {
                        "type": "string"
                      },
                      "transportType": {
                        "type": "string",
                        "enum": [
                          "stdio",
                          "streamable-http"
                        ]
                      },
                      "httpPort": {
                        "type": "number"
                      },
                      "httpPath": {
                        "type": "string"
                      },
                      "nodePort": {
                        "type": "number"
                      },
                      "serviceAccount": {
                        "type": "string"
                      },
                      "imagePullSecrets": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "existing"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "source",
                                "name"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "credentials"
                                  ]
                                },
                                "server": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "username": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "password": {
                                  "type": "string"
                                },
                                "email": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source",
                                "server",
                                "username"
                              ]
                            }
                          ]
                        }
                      }
                    }
                  },
                  "deploymentSpecYaml": {
                    "nullable": true,
                    "type": "string"
                  },
                  "userConfig": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/UserConfigFieldInput"
                    }
                  },
                  "oauthConfig": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "server_url": {
                        "type": "string"
                      },
                      "grant_type": {
                        "type": "string",
                        "enum": [
                          "authorization_code",
                          "client_credentials"
                        ]
                      },
                      "auth_server_url": {
                        "type": "string"
                      },
                      "authorization_endpoint": {
                        "type": "string"
                      },
                      "resource_metadata_url": {
                        "type": "string"
                      },
                      "client_id": {
                        "type": "string"
                      },
                      "client_secret": {
                        "type": "string"
                      },
                      "audience": {
                        "type": "string"
                      },
                      "resource": {
                        "type": "string"
                      },
                      "redirect_uris": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": {
                        "type": "string"
                      },
                      "well_known_url": {
                        "type": "string"
                      },
                      "default_scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "supports_resource_metadata": {
                        "type": "boolean"
                      },
                      "additional_scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "generic_oauth": {
                        "type": "boolean"
                      },
                      "token_endpoint": {
                        "type": "string"
                      },
                      "access_token_env_var": {
                        "type": "string",
                        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                      },
                      "requires_proxy": {
                        "type": "boolean"
                      },
                      "provider_name": {
                        "type": "string"
                      },
                      "browser_auth": {
                        "type": "boolean"
                      },
                      "streamable_http_url": {
                        "type": "string"
                      },
                      "streamable_http_port": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "server_url",
                      "client_id",
                      "redirect_uris",
                      "scopes",
                      "default_scopes",
                      "supports_resource_metadata"
                    ]
                  },
                  "enterpriseManagedConfig": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "identityProviderId": {
                        "type": "string"
                      },
                      "assertionMode": {
                        "type": "string",
                        "enum": [
                          "exchange",
                          "passthrough"
                        ]
                      },
                      "resourceType": {
                        "type": "string",
                        "enum": [
                          "mcp",
                          "oauth_protected_resource",
                          "secret",
                          "service_account",
                          "custom_http"
                        ]
                      },
                      "resourceIdentifier": {
                        "type": "string"
                      },
                      "requestedIssuer": {
                        "type": "string"
                      },
                      "requestedCredentialType": {
                        "type": "string",
                        "enum": [
                          "id_jag",
                          "bearer_token",
                          "secret",
                          "service_account",
                          "opaque_json"
                        ]
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "audience": {
                        "type": "string"
                      },
                      "clientIdOverride": {
                        "type": "string"
                      },
                      "clientSecretOverride": {
                        "type": "string"
                      },
                      "tokenInjectionMode": {
                        "type": "string",
                        "enum": [
                          "authorization_bearer",
                          "raw_authorization",
                          "header",
                          "env",
                          "body_field"
                        ]
                      },
                      "headerName": {
                        "type": "string"
                      },
                      "envVarName": {
                        "type": "string"
                      },
                      "bodyFieldName": {
                        "type": "string"
                      },
                      "responseFieldPath": {
                        "type": "string"
                      },
                      "fallbackMode": {
                        "type": "string",
                        "enum": [
                          "fail_closed",
                          "fallback_to_dynamic",
                          "fallback_to_static"
                        ]
                      },
                      "cacheTtlSeconds": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    }
                  },
                  "icon": {
                    "nullable": true,
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "clonedFrom": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "catalogReinstallRequired": {
                    "type": "boolean"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "level": {
                              "type": "string",
                              "enum": [
                                "use",
                                "write"
                              ]
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      ]
                    }
                  },
                  "oauthClientSecretVaultPath": {
                    "type": "string"
                  },
                  "oauthClientSecretVaultKey": {
                    "type": "string"
                  },
                  "localConfigVaultPath": {
                    "type": "string"
                  },
                  "localConfigVaultKey": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "serverType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "instructions": {
                      "nullable": true,
                      "type": "string"
                    },
                    "repository": {
                      "nullable": true,
                      "type": "string"
                    },
                    "installationCommand": {
                      "nullable": true,
                      "type": "string"
                    },
                    "requiresAuth": {
                      "type": "boolean"
                    },
                    "authDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authFields": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "required": {
                            "default": false,
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "label",
                          "type",
                          "required"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "multitenant": {
                      "type": "boolean"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "dynamicConnectionMcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "docsUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "clientSecretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "localConfigSecretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "localConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "command": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "environment": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "plain_text",
                                  "secret",
                                  "boolean",
                                  "number"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "promptOnInstallation": {
                                "type": "boolean"
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "description": {
                                "type": "string"
                              },
                              "default": {
                                "allOf": [
                                  {
                                    "$ref": "#/components/schemas/LocalConfigEnvironmentDefault"
                                  }
                                ]
                              },
                              "mounted": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "key",
                              "type",
                              "promptOnInstallation"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "envFrom": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "secret",
                                  "configMap"
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "prefix": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "dockerImage": {
                          "type": "string"
                        },
                        "serviceAccount": {
                          "type": "string"
                        },
                        "transportType": {
                          "type": "string",
                          "enum": [
                            "stdio",
                            "streamable-http"
                          ]
                        },
                        "httpPort": {
                          "type": "number"
                        },
                        "httpPath": {
                          "type": "string"
                        },
                        "nodePort": {
                          "type": "number"
                        },
                        "imagePullSecrets": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "source": {
                                        "type": "string",
                                        "enum": [
                                          "existing"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "source",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "source": {
                                        "type": "string",
                                        "enum": [
                                          "credentials"
                                        ]
                                      },
                                      "server": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "username": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "password": {
                                        "type": "string"
                                      },
                                      "email": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "source",
                                      "server",
                                      "username"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "deploymentSpecYaml": {
                      "nullable": true,
                      "type": "string"
                    },
                    "userConfig": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/UserConfigField"
                      }
                    },
                    "oauthConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "server_url": {
                          "type": "string"
                        },
                        "grant_type": {
                          "type": "string",
                          "enum": [
                            "authorization_code",
                            "client_credentials"
                          ]
                        },
                        "auth_server_url": {
                          "type": "string"
                        },
                        "authorization_endpoint": {
                          "type": "string"
                        },
                        "resource_metadata_url": {
                          "type": "string"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "client_secret": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "resource": {
                          "type": "string"
                        },
                        "redirect_uris": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "description": {
                          "type": "string"
                        },
                        "well_known_url": {
                          "type": "string"
                        },
                        "default_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "supports_resource_metadata": {
                          "type": "boolean"
                        },
                        "additional_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "generic_oauth": {
                          "type": "boolean"
                        },
                        "token_endpoint": {
                          "type": "string"
                        },
                        "access_token_env_var": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                        },
                        "requires_proxy": {
                          "type": "boolean"
                        },
                        "provider_name": {
                          "type": "string"
                        },
                        "browser_auth": {
                          "type": "boolean"
                        },
                        "streamable_http_url": {
                          "type": "string"
                        },
                        "streamable_http_port": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "name",
                        "server_url",
                        "client_id",
                        "redirect_uris",
                        "scopes",
                        "default_scopes",
                        "supports_resource_metadata"
                      ],
                      "additionalProperties": false
                    },
                    "enterpriseManagedConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "identityProviderId": {
                          "type": "string"
                        },
                        "assertionMode": {
                          "type": "string",
                          "enum": [
                            "exchange",
                            "passthrough"
                          ]
                        },
                        "resourceType": {
                          "type": "string",
                          "enum": [
                            "mcp",
                            "oauth_protected_resource",
                            "secret",
                            "service_account",
                            "custom_http"
                          ]
                        },
                        "resourceIdentifier": {
                          "type": "string"
                        },
                        "requestedIssuer": {
                          "type": "string"
                        },
                        "requestedCredentialType": {
                          "type": "string",
                          "enum": [
                            "id_jag",
                            "bearer_token",
                            "secret",
                            "service_account",
                            "opaque_json"
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientIdOverride": {
                          "type": "string"
                        },
                        "clientSecretOverride": {
                          "type": "string"
                        },
                        "tokenInjectionMode": {
                          "type": "string",
                          "enum": [
                            "authorization_bearer",
                            "raw_authorization",
                            "header",
                            "env",
                            "body_field"
                          ]
                        },
                        "headerName": {
                          "type": "string"
                        },
                        "envVarName": {
                          "type": "string"
                        },
                        "bodyFieldName": {
                          "type": "string"
                        },
                        "responseFieldPath": {
                          "type": "string"
                        },
                        "fallbackMode": {
                          "type": "string",
                          "enum": [
                            "fail_closed",
                            "fallback_to_dynamic",
                            "fallback_to_static"
                          ]
                        },
                        "cacheTtlSeconds": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "additionalProperties": false
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "organizationId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "clonedFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "catalogReinstallRequired": {
                      "type": "boolean"
                    },
                    "catalogItemApprovalStatus": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReason": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReviewedBy": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReviewedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "labels": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "level": {
                            "type": "string",
                            "enum": [
                              "use",
                              "write"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "level"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "version",
                    "description",
                    "instructions",
                    "repository",
                    "installationCommand",
                    "requiresAuth",
                    "authDescription",
                    "authFields",
                    "serverType",
                    "multitenant",
                    "deploymentName",
                    "dynamicConnectionMcpServerId",
                    "serverUrl",
                    "docsUrl",
                    "clientSecretId",
                    "localConfigSecretId",
                    "localConfig",
                    "deploymentSpecYaml",
                    "userConfig",
                    "oauthConfig",
                    "enterpriseManagedConfig",
                    "icon",
                    "organizationId",
                    "authorId",
                    "scope",
                    "clonedFrom",
                    "environmentId",
                    "catalogReinstallRequired",
                    "catalogItemApprovalStatus",
                    "catalogItemApprovalReason",
                    "catalogItemApprovalReviewedBy",
                    "catalogItemApprovalReviewedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "labels",
                    "teams"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:create"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/{id}": {
      "get": {
        "operationId": "getInternalMcpCatalogItem",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Get Internal MCP catalog item by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:read`: Browse the MCP server registry",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "instructions": {
                      "nullable": true,
                      "type": "string"
                    },
                    "repository": {
                      "nullable": true,
                      "type": "string"
                    },
                    "installationCommand": {
                      "nullable": true,
                      "type": "string"
                    },
                    "requiresAuth": {
                      "type": "boolean"
                    },
                    "authDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authFields": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "required": {
                            "default": false,
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "label",
                          "type",
                          "required"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "multitenant": {
                      "type": "boolean"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "dynamicConnectionMcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "docsUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "clientSecretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "localConfigSecretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "localConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "command": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "environment": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "plain_text",
                                  "secret",
                                  "boolean",
                                  "number"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "promptOnInstallation": {
                                "type": "boolean"
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "description": {
                                "type": "string"
                              },
                              "default": {
                                "allOf": [
                                  {
                                    "$ref": "#/components/schemas/LocalConfigEnvironmentDefault"
                                  }
                                ]
                              },
                              "mounted": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "key",
                              "type",
                              "promptOnInstallation"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "envFrom": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "secret",
                                  "configMap"
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "prefix": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "dockerImage": {
                          "type": "string"
                        },
                        "serviceAccount": {
                          "type": "string"
                        },
                        "transportType": {
                          "type": "string",
                          "enum": [
                            "stdio",
                            "streamable-http"
                          ]
                        },
                        "httpPort": {
                          "type": "number"
                        },
                        "httpPath": {
                          "type": "string"
                        },
                        "nodePort": {
                          "type": "number"
                        },
                        "imagePullSecrets": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "source": {
                                        "type": "string",
                                        "enum": [
                                          "existing"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "source",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "source": {
                                        "type": "string",
                                        "enum": [
                                          "credentials"
                                        ]
                                      },
                                      "server": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "username": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "password": {
                                        "type": "string"
                                      },
                                      "email": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "source",
                                      "server",
                                      "username"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "deploymentSpecYaml": {
                      "nullable": true,
                      "type": "string"
                    },
                    "userConfig": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/UserConfigField"
                      }
                    },
                    "oauthConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "server_url": {
                          "type": "string"
                        },
                        "grant_type": {
                          "type": "string",
                          "enum": [
                            "authorization_code",
                            "client_credentials"
                          ]
                        },
                        "auth_server_url": {
                          "type": "string"
                        },
                        "authorization_endpoint": {
                          "type": "string"
                        },
                        "resource_metadata_url": {
                          "type": "string"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "client_secret": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "resource": {
                          "type": "string"
                        },
                        "redirect_uris": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "description": {
                          "type": "string"
                        },
                        "well_known_url": {
                          "type": "string"
                        },
                        "default_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "supports_resource_metadata": {
                          "type": "boolean"
                        },
                        "additional_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "generic_oauth": {
                          "type": "boolean"
                        },
                        "token_endpoint": {
                          "type": "string"
                        },
                        "access_token_env_var": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                        },
                        "requires_proxy": {
                          "type": "boolean"
                        },
                        "provider_name": {
                          "type": "string"
                        },
                        "browser_auth": {
                          "type": "boolean"
                        },
                        "streamable_http_url": {
                          "type": "string"
                        },
                        "streamable_http_port": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "name",
                        "server_url",
                        "client_id",
                        "redirect_uris",
                        "scopes",
                        "default_scopes",
                        "supports_resource_metadata"
                      ],
                      "additionalProperties": false
                    },
                    "enterpriseManagedConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "identityProviderId": {
                          "type": "string"
                        },
                        "assertionMode": {
                          "type": "string",
                          "enum": [
                            "exchange",
                            "passthrough"
                          ]
                        },
                        "resourceType": {
                          "type": "string",
                          "enum": [
                            "mcp",
                            "oauth_protected_resource",
                            "secret",
                            "service_account",
                            "custom_http"
                          ]
                        },
                        "resourceIdentifier": {
                          "type": "string"
                        },
                        "requestedIssuer": {
                          "type": "string"
                        },
                        "requestedCredentialType": {
                          "type": "string",
                          "enum": [
                            "id_jag",
                            "bearer_token",
                            "secret",
                            "service_account",
                            "opaque_json"
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientIdOverride": {
                          "type": "string"
                        },
                        "clientSecretOverride": {
                          "type": "string"
                        },
                        "tokenInjectionMode": {
                          "type": "string",
                          "enum": [
                            "authorization_bearer",
                            "raw_authorization",
                            "header",
                            "env",
                            "body_field"
                          ]
                        },
                        "headerName": {
                          "type": "string"
                        },
                        "envVarName": {
                          "type": "string"
                        },
                        "bodyFieldName": {
                          "type": "string"
                        },
                        "responseFieldPath": {
                          "type": "string"
                        },
                        "fallbackMode": {
                          "type": "string",
                          "enum": [
                            "fail_closed",
                            "fallback_to_dynamic",
                            "fallback_to_static"
                          ]
                        },
                        "cacheTtlSeconds": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "additionalProperties": false
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "organizationId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "clonedFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "catalogReinstallRequired": {
                      "type": "boolean"
                    },
                    "catalogItemApprovalStatus": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReason": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReviewedBy": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReviewedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "labels": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "level": {
                            "type": "string",
                            "enum": [
                              "use",
                              "write"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "level"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "version",
                    "description",
                    "instructions",
                    "repository",
                    "installationCommand",
                    "requiresAuth",
                    "authDescription",
                    "authFields",
                    "serverType",
                    "multitenant",
                    "deploymentName",
                    "dynamicConnectionMcpServerId",
                    "serverUrl",
                    "docsUrl",
                    "clientSecretId",
                    "localConfigSecretId",
                    "localConfig",
                    "deploymentSpecYaml",
                    "userConfig",
                    "oauthConfig",
                    "enterpriseManagedConfig",
                    "icon",
                    "organizationId",
                    "authorId",
                    "scope",
                    "clonedFrom",
                    "environmentId",
                    "catalogReinstallRequired",
                    "catalogItemApprovalStatus",
                    "catalogItemApprovalReason",
                    "catalogItemApprovalReviewedBy",
                    "catalogItemApprovalReviewedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "labels",
                    "teams"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:read"
          ]
        }
      },
      "put": {
        "operationId": "updateInternalMcpCatalogItem",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Update an Internal MCP catalog item\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:update`: Modify MCP registry entries",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "nullable": true,
                    "type": "string"
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "repository": {
                    "nullable": true,
                    "type": "string"
                  },
                  "installationCommand": {
                    "nullable": true,
                    "type": "string"
                  },
                  "requiresAuth": {
                    "type": "boolean"
                  },
                  "authDescription": {
                    "nullable": true,
                    "type": "string"
                  },
                  "authFields": {
                    "nullable": true,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "required": {
                          "default": false,
                          "type": "boolean"
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "label",
                        "type"
                      ]
                    }
                  },
                  "serverType": {
                    "type": "string",
                    "enum": [
                      "local",
                      "remote",
                      "builtin",
                      "app"
                    ]
                  },
                  "dynamicConnectionMcpServerId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "serverUrl": {
                    "nullable": true,
                    "type": "string"
                  },
                  "docsUrl": {
                    "nullable": true,
                    "type": "string"
                  },
                  "clientSecretId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "localConfigSecretId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "localConfig": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "arguments": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "environment": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "plain_text",
                                "secret",
                                "boolean",
                                "number"
                              ]
                            },
                            "value": {
                              "type": "string"
                            },
                            "promptOnInstallation": {
                              "type": "boolean"
                            },
                            "required": {
                              "type": "boolean"
                            },
                            "description": {
                              "type": "string"
                            },
                            "default": {
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/LocalConfigEnvironmentDefaultInput"
                                }
                              ]
                            },
                            "mounted": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "key",
                            "type",
                            "promptOnInstallation"
                          ]
                        }
                      },
                      "envFrom": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "secret",
                                "configMap"
                              ]
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "prefix": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ]
                        }
                      },
                      "dockerImage": {
                        "type": "string"
                      },
                      "transportType": {
                        "type": "string",
                        "enum": [
                          "stdio",
                          "streamable-http"
                        ]
                      },
                      "httpPort": {
                        "type": "number"
                      },
                      "httpPath": {
                        "type": "string"
                      },
                      "nodePort": {
                        "type": "number"
                      },
                      "serviceAccount": {
                        "type": "string"
                      },
                      "imagePullSecrets": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "existing"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "source",
                                "name"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "credentials"
                                  ]
                                },
                                "server": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "username": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "password": {
                                  "type": "string"
                                },
                                "email": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "source",
                                "server",
                                "username"
                              ]
                            }
                          ]
                        }
                      }
                    }
                  },
                  "deploymentSpecYaml": {
                    "nullable": true,
                    "type": "string"
                  },
                  "userConfig": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/UserConfigFieldInput"
                    }
                  },
                  "oauthConfig": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "server_url": {
                        "type": "string"
                      },
                      "grant_type": {
                        "type": "string",
                        "enum": [
                          "authorization_code",
                          "client_credentials"
                        ]
                      },
                      "auth_server_url": {
                        "type": "string"
                      },
                      "authorization_endpoint": {
                        "type": "string"
                      },
                      "resource_metadata_url": {
                        "type": "string"
                      },
                      "client_id": {
                        "type": "string"
                      },
                      "client_secret": {
                        "type": "string"
                      },
                      "audience": {
                        "type": "string"
                      },
                      "resource": {
                        "type": "string"
                      },
                      "redirect_uris": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "description": {
                        "type": "string"
                      },
                      "well_known_url": {
                        "type": "string"
                      },
                      "default_scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "supports_resource_metadata": {
                        "type": "boolean"
                      },
                      "additional_scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "generic_oauth": {
                        "type": "boolean"
                      },
                      "token_endpoint": {
                        "type": "string"
                      },
                      "access_token_env_var": {
                        "type": "string",
                        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                      },
                      "requires_proxy": {
                        "type": "boolean"
                      },
                      "provider_name": {
                        "type": "string"
                      },
                      "browser_auth": {
                        "type": "boolean"
                      },
                      "streamable_http_url": {
                        "type": "string"
                      },
                      "streamable_http_port": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "name",
                      "server_url",
                      "client_id",
                      "redirect_uris",
                      "scopes",
                      "default_scopes",
                      "supports_resource_metadata"
                    ]
                  },
                  "enterpriseManagedConfig": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "identityProviderId": {
                        "type": "string"
                      },
                      "assertionMode": {
                        "type": "string",
                        "enum": [
                          "exchange",
                          "passthrough"
                        ]
                      },
                      "resourceType": {
                        "type": "string",
                        "enum": [
                          "mcp",
                          "oauth_protected_resource",
                          "secret",
                          "service_account",
                          "custom_http"
                        ]
                      },
                      "resourceIdentifier": {
                        "type": "string"
                      },
                      "requestedIssuer": {
                        "type": "string"
                      },
                      "requestedCredentialType": {
                        "type": "string",
                        "enum": [
                          "id_jag",
                          "bearer_token",
                          "secret",
                          "service_account",
                          "opaque_json"
                        ]
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "audience": {
                        "type": "string"
                      },
                      "clientIdOverride": {
                        "type": "string"
                      },
                      "clientSecretOverride": {
                        "type": "string"
                      },
                      "tokenInjectionMode": {
                        "type": "string",
                        "enum": [
                          "authorization_bearer",
                          "raw_authorization",
                          "header",
                          "env",
                          "body_field"
                        ]
                      },
                      "headerName": {
                        "type": "string"
                      },
                      "envVarName": {
                        "type": "string"
                      },
                      "bodyFieldName": {
                        "type": "string"
                      },
                      "responseFieldPath": {
                        "type": "string"
                      },
                      "fallbackMode": {
                        "type": "string",
                        "enum": [
                          "fail_closed",
                          "fallback_to_dynamic",
                          "fallback_to_static"
                        ]
                      },
                      "cacheTtlSeconds": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    }
                  },
                  "icon": {
                    "nullable": true,
                    "type": "string"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "catalogReinstallRequired": {
                    "type": "boolean"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1
                            },
                            "level": {
                              "type": "string",
                              "enum": [
                                "use",
                                "write"
                              ]
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      ]
                    }
                  },
                  "oauthClientSecretVaultPath": {
                    "type": "string"
                  },
                  "oauthClientSecretVaultKey": {
                    "type": "string"
                  },
                  "localConfigVaultPath": {
                    "type": "string"
                  },
                  "localConfigVaultKey": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "instructions": {
                      "nullable": true,
                      "type": "string"
                    },
                    "repository": {
                      "nullable": true,
                      "type": "string"
                    },
                    "installationCommand": {
                      "nullable": true,
                      "type": "string"
                    },
                    "requiresAuth": {
                      "type": "boolean"
                    },
                    "authDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authFields": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "required": {
                            "default": false,
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "label",
                          "type",
                          "required"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "multitenant": {
                      "type": "boolean"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "dynamicConnectionMcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "docsUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "clientSecretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "localConfigSecretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "localConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "command": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "environment": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "plain_text",
                                  "secret",
                                  "boolean",
                                  "number"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "promptOnInstallation": {
                                "type": "boolean"
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "description": {
                                "type": "string"
                              },
                              "default": {
                                "allOf": [
                                  {
                                    "$ref": "#/components/schemas/LocalConfigEnvironmentDefault"
                                  }
                                ]
                              },
                              "mounted": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "key",
                              "type",
                              "promptOnInstallation"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "envFrom": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "secret",
                                  "configMap"
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "prefix": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "dockerImage": {
                          "type": "string"
                        },
                        "serviceAccount": {
                          "type": "string"
                        },
                        "transportType": {
                          "type": "string",
                          "enum": [
                            "stdio",
                            "streamable-http"
                          ]
                        },
                        "httpPort": {
                          "type": "number"
                        },
                        "httpPath": {
                          "type": "string"
                        },
                        "nodePort": {
                          "type": "number"
                        },
                        "imagePullSecrets": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "source": {
                                        "type": "string",
                                        "enum": [
                                          "existing"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "source",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "source": {
                                        "type": "string",
                                        "enum": [
                                          "credentials"
                                        ]
                                      },
                                      "server": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "username": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "password": {
                                        "type": "string"
                                      },
                                      "email": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "source",
                                      "server",
                                      "username"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "deploymentSpecYaml": {
                      "nullable": true,
                      "type": "string"
                    },
                    "userConfig": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/UserConfigField"
                      }
                    },
                    "oauthConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "server_url": {
                          "type": "string"
                        },
                        "grant_type": {
                          "type": "string",
                          "enum": [
                            "authorization_code",
                            "client_credentials"
                          ]
                        },
                        "auth_server_url": {
                          "type": "string"
                        },
                        "authorization_endpoint": {
                          "type": "string"
                        },
                        "resource_metadata_url": {
                          "type": "string"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "client_secret": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "resource": {
                          "type": "string"
                        },
                        "redirect_uris": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "description": {
                          "type": "string"
                        },
                        "well_known_url": {
                          "type": "string"
                        },
                        "default_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "supports_resource_metadata": {
                          "type": "boolean"
                        },
                        "additional_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "generic_oauth": {
                          "type": "boolean"
                        },
                        "token_endpoint": {
                          "type": "string"
                        },
                        "access_token_env_var": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                        },
                        "requires_proxy": {
                          "type": "boolean"
                        },
                        "provider_name": {
                          "type": "string"
                        },
                        "browser_auth": {
                          "type": "boolean"
                        },
                        "streamable_http_url": {
                          "type": "string"
                        },
                        "streamable_http_port": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "name",
                        "server_url",
                        "client_id",
                        "redirect_uris",
                        "scopes",
                        "default_scopes",
                        "supports_resource_metadata"
                      ],
                      "additionalProperties": false
                    },
                    "enterpriseManagedConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "identityProviderId": {
                          "type": "string"
                        },
                        "assertionMode": {
                          "type": "string",
                          "enum": [
                            "exchange",
                            "passthrough"
                          ]
                        },
                        "resourceType": {
                          "type": "string",
                          "enum": [
                            "mcp",
                            "oauth_protected_resource",
                            "secret",
                            "service_account",
                            "custom_http"
                          ]
                        },
                        "resourceIdentifier": {
                          "type": "string"
                        },
                        "requestedIssuer": {
                          "type": "string"
                        },
                        "requestedCredentialType": {
                          "type": "string",
                          "enum": [
                            "id_jag",
                            "bearer_token",
                            "secret",
                            "service_account",
                            "opaque_json"
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientIdOverride": {
                          "type": "string"
                        },
                        "clientSecretOverride": {
                          "type": "string"
                        },
                        "tokenInjectionMode": {
                          "type": "string",
                          "enum": [
                            "authorization_bearer",
                            "raw_authorization",
                            "header",
                            "env",
                            "body_field"
                          ]
                        },
                        "headerName": {
                          "type": "string"
                        },
                        "envVarName": {
                          "type": "string"
                        },
                        "bodyFieldName": {
                          "type": "string"
                        },
                        "responseFieldPath": {
                          "type": "string"
                        },
                        "fallbackMode": {
                          "type": "string",
                          "enum": [
                            "fail_closed",
                            "fallback_to_dynamic",
                            "fallback_to_static"
                          ]
                        },
                        "cacheTtlSeconds": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "additionalProperties": false
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "organizationId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "clonedFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "catalogReinstallRequired": {
                      "type": "boolean"
                    },
                    "catalogItemApprovalStatus": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReason": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReviewedBy": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReviewedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "labels": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "level": {
                            "type": "string",
                            "enum": [
                              "use",
                              "write"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "level"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "version",
                    "description",
                    "instructions",
                    "repository",
                    "installationCommand",
                    "requiresAuth",
                    "authDescription",
                    "authFields",
                    "serverType",
                    "multitenant",
                    "deploymentName",
                    "dynamicConnectionMcpServerId",
                    "serverUrl",
                    "docsUrl",
                    "clientSecretId",
                    "localConfigSecretId",
                    "localConfig",
                    "deploymentSpecYaml",
                    "userConfig",
                    "oauthConfig",
                    "enterpriseManagedConfig",
                    "icon",
                    "organizationId",
                    "authorId",
                    "scope",
                    "clonedFrom",
                    "environmentId",
                    "catalogReinstallRequired",
                    "catalogItemApprovalStatus",
                    "catalogItemApprovalReason",
                    "catalogItemApprovalReviewedBy",
                    "catalogItemApprovalReviewedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "labels",
                    "teams"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteInternalMcpCatalogItem",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Delete an Internal MCP catalog item\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:delete`: Remove servers from the MCP registry",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:delete"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/{id}/tools": {
      "get": {
        "operationId": "getInternalMcpCatalogTools",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Get tools for a catalog item (including builtin Archestra tools)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:read`: Browse the MCP server registry",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "group": {
                        "nullable": true,
                        "type": "string"
                      },
                      "assignedAgentCount": {
                        "type": "number"
                      },
                      "assignedAgents": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "description",
                      "parameters",
                      "createdAt",
                      "group",
                      "assignedAgentCount",
                      "assignedAgents"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:read"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/{id}/reinstall": {
      "post": {
        "operationId": "reinstallInternalMcpCatalogItem",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Reinstall the shared K8s Deployment for a multi-tenant local catalog and cascade tool sync to every install.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:update`: Modify MCP registry entries",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:update"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/{id}/refresh-image": {
      "post": {
        "operationId": "refreshInternalMcpCatalogImage",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Restart all local MCP server pods for a catalog so Kubernetes pulls the current configured image. Fan-out restarts are best effort: the request succeeds when at least one target restarts successfully, while failed installs are marked with their own error status.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:update`: Modify MCP registry entries",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:update"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/pending-image-approval": {
      "get": {
        "operationId": "listPendingImageApprovalCatalogItems",
        "tags": [
          "MCP Catalog"
        ],
        "description": "List local catalog items in the org whose custom image is awaiting admin approval (blocked by the target environment's trusted image registries).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:admin`: Approve or manage all MCP server installations",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "version": {
                        "nullable": true,
                        "type": "string"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "instructions": {
                        "nullable": true,
                        "type": "string"
                      },
                      "repository": {
                        "nullable": true,
                        "type": "string"
                      },
                      "installationCommand": {
                        "nullable": true,
                        "type": "string"
                      },
                      "requiresAuth": {
                        "type": "boolean"
                      },
                      "authDescription": {
                        "nullable": true,
                        "type": "string"
                      },
                      "authFields": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            },
                            "required": {
                              "default": false,
                              "type": "boolean"
                            },
                            "description": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "label",
                            "type",
                            "required"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "serverType": {
                        "type": "string",
                        "enum": [
                          "local",
                          "remote",
                          "builtin",
                          "app"
                        ]
                      },
                      "multitenant": {
                        "type": "boolean"
                      },
                      "deploymentName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "dynamicConnectionMcpServerId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "serverUrl": {
                        "nullable": true,
                        "type": "string"
                      },
                      "docsUrl": {
                        "nullable": true,
                        "type": "string"
                      },
                      "clientSecretId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "localConfigSecretId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "localConfig": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "command": {
                            "type": "string"
                          },
                          "arguments": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "environment": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "plain_text",
                                    "secret",
                                    "boolean",
                                    "number"
                                  ]
                                },
                                "value": {
                                  "type": "string"
                                },
                                "promptOnInstallation": {
                                  "type": "boolean"
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "default": {
                                  "allOf": [
                                    {
                                      "$ref": "#/components/schemas/LocalConfigEnvironmentDefault"
                                    }
                                  ]
                                },
                                "mounted": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "key",
                                "type",
                                "promptOnInstallation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "envFrom": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "secret",
                                    "configMap"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "prefix": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "dockerImage": {
                            "type": "string"
                          },
                          "serviceAccount": {
                            "type": "string"
                          },
                          "transportType": {
                            "type": "string",
                            "enum": [
                              "stdio",
                              "streamable-http"
                            ]
                          },
                          "httpPort": {
                            "type": "number"
                          },
                          "httpPath": {
                            "type": "string"
                          },
                          "nodePort": {
                            "type": "number"
                          },
                          "imagePullSecrets": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "source": {
                                          "type": "string",
                                          "enum": [
                                            "existing"
                                          ]
                                        },
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "source",
                                        "name"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "source": {
                                          "type": "string",
                                          "enum": [
                                            "credentials"
                                          ]
                                        },
                                        "server": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "username": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "password": {
                                          "type": "string"
                                        },
                                        "email": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "source",
                                        "server",
                                        "username"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              ]
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "deploymentSpecYaml": {
                        "nullable": true,
                        "type": "string"
                      },
                      "userConfig": {
                        "nullable": true,
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/components/schemas/UserConfigField"
                        }
                      },
                      "oauthConfig": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "server_url": {
                            "type": "string"
                          },
                          "grant_type": {
                            "type": "string",
                            "enum": [
                              "authorization_code",
                              "client_credentials"
                            ]
                          },
                          "auth_server_url": {
                            "type": "string"
                          },
                          "authorization_endpoint": {
                            "type": "string"
                          },
                          "resource_metadata_url": {
                            "type": "string"
                          },
                          "client_id": {
                            "type": "string"
                          },
                          "client_secret": {
                            "type": "string"
                          },
                          "audience": {
                            "type": "string"
                          },
                          "resource": {
                            "type": "string"
                          },
                          "redirect_uris": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": {
                            "type": "string"
                          },
                          "well_known_url": {
                            "type": "string"
                          },
                          "default_scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "supports_resource_metadata": {
                            "type": "boolean"
                          },
                          "additional_scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "generic_oauth": {
                            "type": "boolean"
                          },
                          "token_endpoint": {
                            "type": "string"
                          },
                          "access_token_env_var": {
                            "type": "string",
                            "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                          },
                          "requires_proxy": {
                            "type": "boolean"
                          },
                          "provider_name": {
                            "type": "string"
                          },
                          "browser_auth": {
                            "type": "boolean"
                          },
                          "streamable_http_url": {
                            "type": "string"
                          },
                          "streamable_http_port": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "name",
                          "server_url",
                          "client_id",
                          "redirect_uris",
                          "scopes",
                          "default_scopes",
                          "supports_resource_metadata"
                        ],
                        "additionalProperties": false
                      },
                      "enterpriseManagedConfig": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "identityProviderId": {
                            "type": "string"
                          },
                          "assertionMode": {
                            "type": "string",
                            "enum": [
                              "exchange",
                              "passthrough"
                            ]
                          },
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "mcp",
                              "oauth_protected_resource",
                              "secret",
                              "service_account",
                              "custom_http"
                            ]
                          },
                          "resourceIdentifier": {
                            "type": "string"
                          },
                          "requestedIssuer": {
                            "type": "string"
                          },
                          "requestedCredentialType": {
                            "type": "string",
                            "enum": [
                              "id_jag",
                              "bearer_token",
                              "secret",
                              "service_account",
                              "opaque_json"
                            ]
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "audience": {
                            "type": "string"
                          },
                          "clientIdOverride": {
                            "type": "string"
                          },
                          "clientSecretOverride": {
                            "type": "string"
                          },
                          "tokenInjectionMode": {
                            "type": "string",
                            "enum": [
                              "authorization_bearer",
                              "raw_authorization",
                              "header",
                              "env",
                              "body_field"
                            ]
                          },
                          "headerName": {
                            "type": "string"
                          },
                          "envVarName": {
                            "type": "string"
                          },
                          "bodyFieldName": {
                            "type": "string"
                          },
                          "responseFieldPath": {
                            "type": "string"
                          },
                          "fallbackMode": {
                            "type": "string",
                            "enum": [
                              "fail_closed",
                              "fallback_to_dynamic",
                              "fallback_to_static"
                            ]
                          },
                          "cacheTtlSeconds": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "additionalProperties": false
                      },
                      "icon": {
                        "nullable": true,
                        "type": "string"
                      },
                      "organizationId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "authorId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ]
                      },
                      "clonedFrom": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "environmentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "catalogReinstallRequired": {
                        "type": "boolean"
                      },
                      "catalogItemApprovalStatus": {
                        "nullable": true,
                        "type": "string"
                      },
                      "catalogItemApprovalReason": {
                        "nullable": true,
                        "type": "string"
                      },
                      "catalogItemApprovalReviewedBy": {
                        "nullable": true,
                        "type": "string"
                      },
                      "catalogItemApprovalReviewedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "labels": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "key",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "teams": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "level": {
                              "type": "string",
                              "enum": [
                                "use",
                                "write"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "level"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "authorName": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "version",
                      "description",
                      "instructions",
                      "repository",
                      "installationCommand",
                      "requiresAuth",
                      "authDescription",
                      "authFields",
                      "serverType",
                      "multitenant",
                      "deploymentName",
                      "dynamicConnectionMcpServerId",
                      "serverUrl",
                      "docsUrl",
                      "clientSecretId",
                      "localConfigSecretId",
                      "localConfig",
                      "deploymentSpecYaml",
                      "userConfig",
                      "oauthConfig",
                      "enterpriseManagedConfig",
                      "icon",
                      "organizationId",
                      "authorId",
                      "scope",
                      "clonedFrom",
                      "environmentId",
                      "catalogReinstallRequired",
                      "catalogItemApprovalStatus",
                      "catalogItemApprovalReason",
                      "catalogItemApprovalReviewedBy",
                      "catalogItemApprovalReviewedAt",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "labels",
                      "teams"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:admin"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/{id}/approve": {
      "post": {
        "operationId": "approveCatalogItemImage",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Approve a local catalog item's image so its installs proceed. Requires mcpServerInstallation:admin.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:admin`: Approve or manage all MCP server installations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "nullable": true,
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "instructions": {
                      "nullable": true,
                      "type": "string"
                    },
                    "repository": {
                      "nullable": true,
                      "type": "string"
                    },
                    "installationCommand": {
                      "nullable": true,
                      "type": "string"
                    },
                    "requiresAuth": {
                      "type": "boolean"
                    },
                    "authDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authFields": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "required": {
                            "default": false,
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "label",
                          "type",
                          "required"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "multitenant": {
                      "type": "boolean"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "dynamicConnectionMcpServerId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "docsUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "clientSecretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "localConfigSecretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "localConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "command": {
                          "type": "string"
                        },
                        "arguments": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "environment": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "plain_text",
                                  "secret",
                                  "boolean",
                                  "number"
                                ]
                              },
                              "value": {
                                "type": "string"
                              },
                              "promptOnInstallation": {
                                "type": "boolean"
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "description": {
                                "type": "string"
                              },
                              "default": {
                                "allOf": [
                                  {
                                    "$ref": "#/components/schemas/LocalConfigEnvironmentDefault"
                                  }
                                ]
                              },
                              "mounted": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "key",
                              "type",
                              "promptOnInstallation"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "envFrom": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "secret",
                                  "configMap"
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "prefix": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "dockerImage": {
                          "type": "string"
                        },
                        "serviceAccount": {
                          "type": "string"
                        },
                        "transportType": {
                          "type": "string",
                          "enum": [
                            "stdio",
                            "streamable-http"
                          ]
                        },
                        "httpPort": {
                          "type": "number"
                        },
                        "httpPath": {
                          "type": "string"
                        },
                        "nodePort": {
                          "type": "number"
                        },
                        "imagePullSecrets": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "source": {
                                        "type": "string",
                                        "enum": [
                                          "existing"
                                        ]
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "source",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "source": {
                                        "type": "string",
                                        "enum": [
                                          "credentials"
                                        ]
                                      },
                                      "server": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "username": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "password": {
                                        "type": "string"
                                      },
                                      "email": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "source",
                                      "server",
                                      "username"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "deploymentSpecYaml": {
                      "nullable": true,
                      "type": "string"
                    },
                    "userConfig": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "$ref": "#/components/schemas/UserConfigField"
                      }
                    },
                    "oauthConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "server_url": {
                          "type": "string"
                        },
                        "grant_type": {
                          "type": "string",
                          "enum": [
                            "authorization_code",
                            "client_credentials"
                          ]
                        },
                        "auth_server_url": {
                          "type": "string"
                        },
                        "authorization_endpoint": {
                          "type": "string"
                        },
                        "resource_metadata_url": {
                          "type": "string"
                        },
                        "client_id": {
                          "type": "string"
                        },
                        "client_secret": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "resource": {
                          "type": "string"
                        },
                        "redirect_uris": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "description": {
                          "type": "string"
                        },
                        "well_known_url": {
                          "type": "string"
                        },
                        "default_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "supports_resource_metadata": {
                          "type": "boolean"
                        },
                        "additional_scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "generic_oauth": {
                          "type": "boolean"
                        },
                        "token_endpoint": {
                          "type": "string"
                        },
                        "access_token_env_var": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                        },
                        "requires_proxy": {
                          "type": "boolean"
                        },
                        "provider_name": {
                          "type": "string"
                        },
                        "browser_auth": {
                          "type": "boolean"
                        },
                        "streamable_http_url": {
                          "type": "string"
                        },
                        "streamable_http_port": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "name",
                        "server_url",
                        "client_id",
                        "redirect_uris",
                        "scopes",
                        "default_scopes",
                        "supports_resource_metadata"
                      ],
                      "additionalProperties": false
                    },
                    "enterpriseManagedConfig": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "identityProviderId": {
                          "type": "string"
                        },
                        "assertionMode": {
                          "type": "string",
                          "enum": [
                            "exchange",
                            "passthrough"
                          ]
                        },
                        "resourceType": {
                          "type": "string",
                          "enum": [
                            "mcp",
                            "oauth_protected_resource",
                            "secret",
                            "service_account",
                            "custom_http"
                          ]
                        },
                        "resourceIdentifier": {
                          "type": "string"
                        },
                        "requestedIssuer": {
                          "type": "string"
                        },
                        "requestedCredentialType": {
                          "type": "string",
                          "enum": [
                            "id_jag",
                            "bearer_token",
                            "secret",
                            "service_account",
                            "opaque_json"
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientIdOverride": {
                          "type": "string"
                        },
                        "clientSecretOverride": {
                          "type": "string"
                        },
                        "tokenInjectionMode": {
                          "type": "string",
                          "enum": [
                            "authorization_bearer",
                            "raw_authorization",
                            "header",
                            "env",
                            "body_field"
                          ]
                        },
                        "headerName": {
                          "type": "string"
                        },
                        "envVarName": {
                          "type": "string"
                        },
                        "bodyFieldName": {
                          "type": "string"
                        },
                        "responseFieldPath": {
                          "type": "string"
                        },
                        "fallbackMode": {
                          "type": "string",
                          "enum": [
                            "fail_closed",
                            "fallback_to_dynamic",
                            "fallback_to_static"
                          ]
                        },
                        "cacheTtlSeconds": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "additionalProperties": false
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "organizationId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "clonedFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "catalogReinstallRequired": {
                      "type": "boolean"
                    },
                    "catalogItemApprovalStatus": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReason": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReviewedBy": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogItemApprovalReviewedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "labels": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "default": [],
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "level": {
                            "type": "string",
                            "enum": [
                              "use",
                              "write"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "level"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "version",
                    "description",
                    "instructions",
                    "repository",
                    "installationCommand",
                    "requiresAuth",
                    "authDescription",
                    "authFields",
                    "serverType",
                    "multitenant",
                    "deploymentName",
                    "dynamicConnectionMcpServerId",
                    "serverUrl",
                    "docsUrl",
                    "clientSecretId",
                    "localConfigSecretId",
                    "localConfig",
                    "deploymentSpecYaml",
                    "userConfig",
                    "oauthConfig",
                    "enterpriseManagedConfig",
                    "icon",
                    "organizationId",
                    "authorId",
                    "scope",
                    "clonedFrom",
                    "environmentId",
                    "catalogReinstallRequired",
                    "catalogItemApprovalStatus",
                    "catalogItemApprovalReason",
                    "catalogItemApprovalReviewedBy",
                    "catalogItemApprovalReviewedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "labels",
                    "teams"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:admin"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/by-name/{name}": {
      "delete": {
        "operationId": "deleteInternalMcpCatalogItemByName",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Delete an Internal MCP catalog item by name\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:delete`: Remove servers from the MCP registry",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "path",
            "name": "name",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:delete"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/{id}/restore": {
      "post": {
        "operationId": "restoreInternalMcpCatalogItem",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Restore a soft-deleted Internal MCP catalog item and its cascaded installs and tools (flag-only reinstall).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:manage-deleted`: View and restore soft-deleted MCP registry entries",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:manage-deleted"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/{id}/deployment-yaml-preview": {
      "get": {
        "operationId": "getDeploymentYamlPreview",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Generate a deployment YAML template preview for a catalog item\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:read`: Browse the MCP server registry",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "yaml": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "yaml"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:read"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/validate-deployment-yaml": {
      "post": {
        "operationId": "validateDeploymentYaml",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Validate a deployment YAML template\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:read`: Browse the MCP server registry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "yaml": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "yaml"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "valid",
                    "errors",
                    "warnings"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:read"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/{id}/reset-deployment-yaml": {
      "post": {
        "operationId": "resetDeploymentYaml",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Reset the deployment YAML to default by clearing the custom YAML\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:update`: Modify MCP registry entries",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "yaml": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "yaml"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:update"
          ]
        }
      }
    },
    "/api/k8s/image-pull-secrets": {
      "get": {
        "operationId": "getK8sImagePullSecrets",
        "tags": [
          "MCP Catalog"
        ],
        "description": "List Kubernetes docker-registry secrets available for imagePullSecrets\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:read`: Browse the MCP server registry",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "registryServers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "name",
                      "registryServers"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:read"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/labels/keys": {
      "get": {
        "operationId": "getInternalMcpCatalogLabelKeys",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Get all label keys used by catalog items\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:read`: Browse the MCP server registry",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:read"
          ]
        }
      }
    },
    "/api/internal_mcp_catalog/labels/values": {
      "get": {
        "operationId": "getInternalMcpCatalogLabelValues",
        "tags": [
          "MCP Catalog"
        ],
        "description": "Get all label values for catalog items\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpRegistry:read`: Browse the MCP server registry",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "key",
            "required": false,
            "description": "Filter values by label key"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpRegistry:read"
          ]
        }
      }
    },
    "/api/invitation/{id}/check": {
      "get": {
        "operationId": "checkInvitation",
        "tags": [
          "Invitation"
        ],
        "description": "Check if an invitation is valid and whether the user exists\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "email",
                        "organizationId",
                        "status",
                        "expiresAt"
                      ],
                      "additionalProperties": false
                    },
                    "userExists": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "invitation",
                    "userExists"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/k8s/capabilities": {
      "get": {
        "operationId": "getK8sCapabilities",
        "tags": [
          "Organization"
        ],
        "description": "Inspect Kubernetes capabilities available to Archestra.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`environment:update`: Modify deployment environments, including the org default environment",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "networkPolicy": {
                      "type": "object",
                      "properties": {
                        "kubernetesNetworkPolicy": {
                          "type": "boolean"
                        },
                        "ciliumNetworkPolicy": {
                          "type": "boolean"
                        },
                        "gkeFqdnNetworkPolicy": {
                          "type": "boolean"
                        },
                        "awsApplicationNetworkPolicy": {
                          "type": "boolean"
                        },
                        "provider": {
                          "type": "string",
                          "enum": [
                            "cilium",
                            "gke-fqdn",
                            "aws-application-network-policy",
                            "kubernetes",
                            "none"
                          ]
                        },
                        "supportsFqdn": {
                          "type": "boolean"
                        },
                        "supportsHttpMethods": {
                          "type": "boolean"
                        },
                        "message": {
                          "nullable": true,
                          "type": "string"
                        },
                        "enforcementSource": {
                          "type": "string",
                          "enum": [
                            "probe",
                            "api-discovery"
                          ]
                        },
                        "enforcementStatus": {
                          "type": "string",
                          "enum": [
                            "verified-enforced",
                            "verified-not-enforced",
                            "unknown"
                          ]
                        },
                        "probe": {
                          "type": "string",
                          "enum": [
                            "enforced",
                            "not-enforced",
                            "inconclusive",
                            "absent"
                          ]
                        },
                        "probedAt": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "kubernetesNetworkPolicy",
                        "ciliumNetworkPolicy",
                        "gkeFqdnNetworkPolicy",
                        "awsApplicationNetworkPolicy",
                        "provider",
                        "supportsFqdn",
                        "supportsHttpMethods",
                        "message",
                        "enforcementSource",
                        "enforcementStatus",
                        "probe",
                        "probedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "networkPolicy"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "environment:update"
          ]
        }
      }
    },
    "/v1/kimi/chat/completions": {
      "post": {
        "operationId": "kimiChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Kimi (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "developer"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "system"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "input_audio"
                                            ]
                                          },
                                          "input_audio": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              },
                                              "format": {
                                                "type": "string",
                                                "enum": [
                                                  "wav",
                                                  "mp3"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "data",
                                              "format"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "input_audio"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "file"
                                            ]
                                          },
                                          "file": {
                                            "type": "object",
                                            "properties": {
                                              "file_data": {
                                                "type": "string"
                                              },
                                              "file_id": {
                                                "type": "string"
                                              },
                                              "filename": {
                                                "type": "string"
                                              }
                                            },
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "file"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "audio": {
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "refusal"
                                        ]
                                      },
                                      "refusal": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "refusal"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                  }
                                }
                              ]
                            },
                            "function_call": {
                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "arguments": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "arguments",
                                "name"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "reasoning_content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "refusal": {
                              "nullable": true,
                              "type": "string"
                            },
                            "tool_calls": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "arguments",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "custom"
                                        ]
                                      },
                                      "custom": {
                                        "type": "object",
                                        "properties": {
                                          "input": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "input",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "custom"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                  }
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                              }
                            }
                          },
                          "required": [
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "tool"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      }
                                    ]
                                  }
                                }
                              ]
                            },
                            "tool_call_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "tool_call_id"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "name"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                        }
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "function": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "strict": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                            }
                          },
                          "required": [
                            "type",
                            "function"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "custom": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name of the custom tool, used to identify it in tool calls"
                                },
                                "description": {
                                  "description": "Optional description of the custom tool, used to provide more context",
                                  "type": "string"
                                },
                                "format": {
                                  "description": "The input format for the custom tool. Default is unconstrained text.",
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text"
                                          ],
                                          "description": "Unconstrained text format. Always `text`"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "description": "Unconstrained free-form text"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "grammar"
                                          ]
                                        },
                                        "grammar": {
                                          "type": "object",
                                          "properties": {
                                            "definition": {
                                              "type": "string",
                                              "description": "The grammar definition"
                                            },
                                            "syntax": {
                                              "type": "string",
                                              "enum": [
                                                "lark",
                                                "regex"
                                              ],
                                              "description": "The syntax of the grammar definition"
                                            }
                                          },
                                          "required": [
                                            "definition",
                                            "syntax"
                                          ],
                                          "description": "Your chosen grammar"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "grammar"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "custom"
                          ],
                          "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                        }
                      ],
                      "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                    }
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "none",
                          "auto",
                          "required"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "allowed_tools"
                            ]
                          },
                          "allowed_tools": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "required"
                                ],
                                "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                              },
                              "tools": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                  }
                                },
                                "description": "A list of tool definitions that the model should be allowed to call"
                              }
                            },
                            "required": [
                              "mode",
                              "tools"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                          }
                        },
                        "required": [
                          "type",
                          "allowed_tools"
                        ],
                        "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "function"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "custom"
                            ]
                          },
                          "custom": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the custom tool, used to identify it in tool calls"
                              },
                              "description": {
                                "description": "Optional description of the custom tool, used to provide more context",
                                "type": "string"
                              },
                              "format": {
                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ],
                                        "description": "Unconstrained text format. Always `text`"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "description": "Unconstrained free-form text"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "grammar"
                                        ]
                                      },
                                      "grammar": {
                                        "type": "object",
                                        "properties": {
                                          "definition": {
                                            "type": "string",
                                            "description": "The grammar definition"
                                          },
                                          "syntax": {
                                            "type": "string",
                                            "enum": [
                                              "lark",
                                              "regex"
                                            ],
                                            "description": "The syntax of the grammar definition"
                                          }
                                        },
                                        "required": [
                                          "definition",
                                          "syntax"
                                        ],
                                        "description": "Your chosen grammar"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "grammar"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "custom"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                      }
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_completion_tokens": {
                    "nullable": true,
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "reasoning_effort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "none",
                      "minimal",
                      "low",
                      "medium",
                      "high",
                      "xhigh"
                    ]
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "finish_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "length",
                                  "tool_calls",
                                  "content_filter",
                                  "function_call"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "index": {
                            "type": "number"
                          },
                          "logprobs": {
                            "nullable": true
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "refusal": {
                                "nullable": true,
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "annotations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              },
                              "audio": {
                                "nullable": true
                              },
                              "function_call": {
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "reasoning_content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "tool_calls": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "input": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "input",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                }
                              }
                            },
                            "required": [
                              "role"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                          }
                        },
                        "required": [
                          "finish_reason",
                          "logprobs",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                      }
                    },
                    "created": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "chat.completion"
                      ]
                    },
                    "server_tier": {
                      "type": "string"
                    },
                    "system_fingerprint": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "completion_tokens": {
                          "type": "number"
                        },
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        },
                        "completion_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                        },
                        "prompt_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                        }
                      },
                      "required": [
                        "completion_tokens",
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                    }
                  },
                  "required": [
                    "id",
                    "choices",
                    "created",
                    "model",
                    "object"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/kimi/{agentId}/chat/completions": {
      "post": {
        "operationId": "kimiChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Kimi for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "developer"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "system"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "input_audio"
                                            ]
                                          },
                                          "input_audio": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              },
                                              "format": {
                                                "type": "string",
                                                "enum": [
                                                  "wav",
                                                  "mp3"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "data",
                                              "format"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "input_audio"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "file"
                                            ]
                                          },
                                          "file": {
                                            "type": "object",
                                            "properties": {
                                              "file_data": {
                                                "type": "string"
                                              },
                                              "file_id": {
                                                "type": "string"
                                              },
                                              "filename": {
                                                "type": "string"
                                              }
                                            },
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "file"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "audio": {
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "refusal"
                                        ]
                                      },
                                      "refusal": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "refusal"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                  }
                                }
                              ]
                            },
                            "function_call": {
                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "arguments": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "arguments",
                                "name"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "reasoning_content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "refusal": {
                              "nullable": true,
                              "type": "string"
                            },
                            "tool_calls": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "arguments",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "custom"
                                        ]
                                      },
                                      "custom": {
                                        "type": "object",
                                        "properties": {
                                          "input": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "input",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "custom"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                  }
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                              }
                            }
                          },
                          "required": [
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "tool"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      }
                                    ]
                                  }
                                }
                              ]
                            },
                            "tool_call_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "tool_call_id"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "name"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                        }
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "function": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "strict": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                            }
                          },
                          "required": [
                            "type",
                            "function"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "custom": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name of the custom tool, used to identify it in tool calls"
                                },
                                "description": {
                                  "description": "Optional description of the custom tool, used to provide more context",
                                  "type": "string"
                                },
                                "format": {
                                  "description": "The input format for the custom tool. Default is unconstrained text.",
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text"
                                          ],
                                          "description": "Unconstrained text format. Always `text`"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "description": "Unconstrained free-form text"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "grammar"
                                          ]
                                        },
                                        "grammar": {
                                          "type": "object",
                                          "properties": {
                                            "definition": {
                                              "type": "string",
                                              "description": "The grammar definition"
                                            },
                                            "syntax": {
                                              "type": "string",
                                              "enum": [
                                                "lark",
                                                "regex"
                                              ],
                                              "description": "The syntax of the grammar definition"
                                            }
                                          },
                                          "required": [
                                            "definition",
                                            "syntax"
                                          ],
                                          "description": "Your chosen grammar"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "grammar"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "custom"
                          ],
                          "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                        }
                      ],
                      "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                    }
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "none",
                          "auto",
                          "required"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "allowed_tools"
                            ]
                          },
                          "allowed_tools": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "required"
                                ],
                                "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                              },
                              "tools": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                  }
                                },
                                "description": "A list of tool definitions that the model should be allowed to call"
                              }
                            },
                            "required": [
                              "mode",
                              "tools"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                          }
                        },
                        "required": [
                          "type",
                          "allowed_tools"
                        ],
                        "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "function"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "custom"
                            ]
                          },
                          "custom": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the custom tool, used to identify it in tool calls"
                              },
                              "description": {
                                "description": "Optional description of the custom tool, used to provide more context",
                                "type": "string"
                              },
                              "format": {
                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ],
                                        "description": "Unconstrained text format. Always `text`"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "description": "Unconstrained free-form text"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "grammar"
                                        ]
                                      },
                                      "grammar": {
                                        "type": "object",
                                        "properties": {
                                          "definition": {
                                            "type": "string",
                                            "description": "The grammar definition"
                                          },
                                          "syntax": {
                                            "type": "string",
                                            "enum": [
                                              "lark",
                                              "regex"
                                            ],
                                            "description": "The syntax of the grammar definition"
                                          }
                                        },
                                        "required": [
                                          "definition",
                                          "syntax"
                                        ],
                                        "description": "Your chosen grammar"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "grammar"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "custom"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                      }
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_completion_tokens": {
                    "nullable": true,
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "reasoning_effort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "none",
                      "minimal",
                      "low",
                      "medium",
                      "high",
                      "xhigh"
                    ]
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "finish_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "length",
                                  "tool_calls",
                                  "content_filter",
                                  "function_call"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "index": {
                            "type": "number"
                          },
                          "logprobs": {
                            "nullable": true
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "refusal": {
                                "nullable": true,
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "annotations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              },
                              "audio": {
                                "nullable": true
                              },
                              "function_call": {
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "reasoning_content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "tool_calls": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "input": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "input",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                }
                              }
                            },
                            "required": [
                              "role"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                          }
                        },
                        "required": [
                          "finish_reason",
                          "logprobs",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                      }
                    },
                    "created": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "chat.completion"
                      ]
                    },
                    "server_tier": {
                      "type": "string"
                    },
                    "system_fingerprint": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "completion_tokens": {
                          "type": "number"
                        },
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        },
                        "completion_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                        },
                        "prompt_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                        }
                      },
                      "required": [
                        "completion_tokens",
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                    }
                  },
                  "required": [
                    "id",
                    "choices",
                    "created",
                    "model",
                    "object"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge-bases": {
      "get": {
        "operationId": "getKnowledgeBases",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "List all knowledge bases for the organization. `status=deleted` lists the soft-deleted ones instead — the trash view, which requires `knowledgeSource:delete`. Search and pagination behave identically on both slices, but the deleted slice carries identity only: `connectors` and `assignedAgents` come back empty and `totalDocsIndexed` zero, since those links resolve to nothing while the knowledge base is in the trash.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by lifecycle status. `deleted` lists soft-deleted knowledge bases and requires `knowledgeSource:delete`."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "connectors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "connectorType": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "jira"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "confluence"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "github"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "gitlab"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "servicenow"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "notion"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "sharepoint"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "gdrive"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "dropbox"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "onedrive"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "asana"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "linear"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "outline"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "salesforce"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "web_crawler"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "perforce"
                                      ]
                                    },
                                    {
                                      "type": "string",
                                      "enum": [
                                        "mfiles"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "connectorType"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "totalDocsIndexed": {
                            "type": "number"
                          },
                          "assignedAgents": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "agentType": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "agentType"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "name",
                          "description",
                          "status",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "connectors",
                          "totalDocsIndexed",
                          "assignedAgents"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      },
      "post": {
        "operationId": "createKnowledgeBase",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Create a new knowledge base\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:create`: Create Knowledge Bases and Connectors",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "description",
                    "status",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:create"
          ]
        }
      }
    },
    "/api/knowledge-bases/{id}": {
      "get": {
        "operationId": "getKnowledgeBase",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Get a knowledge base by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "description",
                    "status",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      },
      "put": {
        "operationId": "updateKnowledgeBase",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Update a knowledge base\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:update`: Modify Knowledge Bases and Connectors",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "description",
                    "status",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteKnowledgeBase",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Delete a knowledge base and remove its connector assignments\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:delete`: Delete Knowledge Bases and Connectors, view the deleted ones, and restore them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:delete"
          ]
        }
      }
    },
    "/api/knowledge-bases/{id}/restore": {
      "post": {
        "operationId": "restoreKnowledgeBase",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Restore a soft-deleted knowledge base. Agent assignments and connector links survive deletion, so the restored knowledge base is immediately live for previously-assigned agents. 404 if there is no soft-deleted knowledge base with that id in the org.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:delete`: Delete Knowledge Bases and Connectors, view the deleted ones, and restore them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:delete"
          ]
        }
      }
    },
    "/api/knowledge-bases/{id}/permanent": {
      "delete": {
        "operationId": "permanentlyDeleteKnowledgeBase",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Permanently destroy a soft-deleted knowledge base (global admins only — a `knowledgeSource:delete` or `knowledgeSource:admin` grant reaches the trash, not past it). Irreversible, with no grace period: the row and its agent and connector assignments are destroyed. Its connectors survive, detached. 404 if there is no soft-deleted knowledge base with that id in the org, which is also the answer when it is still live or the caller is not a global admin. Restore wins a race.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:delete`: Delete Knowledge Bases and Connectors, view the deleted ones, and restore them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:delete"
          ]
        }
      }
    },
    "/api/knowledge-bases/{id}/health": {
      "get": {
        "operationId": "getKnowledgeBaseHealth",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Check the health of a knowledge base\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "healthy",
                        "unhealthy"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      }
    },
    "/api/connectors": {
      "get": {
        "operationId": "getConnectors",
        "tags": [
          "Connectors"
        ],
        "description": "List all connectors for the organization. `status=deleted` lists the soft-deleted ones instead — the trash view, which requires `knowledgeSource:delete`. Search and connector-type filtering behave identically on both slices; `knowledgeBaseId` is an active-only filter and is rejected with a 400 alongside `status=deleted`. The deleted slice carries identity only: `assignedAgents` comes back empty, since those links resolve to nothing while the connector is in the trash. It is also the one slice that never hides a row whose stored `config` no longer matches a known connector shape — the trash is the only place restore and permanent delete are offered.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "knowledgeBaseId",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "jira"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "confluence"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "github"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "gitlab"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "servicenow"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "notion"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "sharepoint"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "gdrive"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "dropbox"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "onedrive"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "asana"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "linear"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "outline"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "salesforce"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "web_crawler"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "perforce"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "mfiles"
                  ]
                }
              ]
            },
            "in": "query",
            "name": "connectorType",
            "required": false
          },
          {
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by lifecycle status. `deleted` lists soft-deleted connectors and requires `knowledgeSource:delete`."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "org-wide",
                              "team-scoped",
                              "auto-sync-permissions"
                            ]
                          },
                          "teamIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "connectorType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "jira"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "confluence"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "github"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "gitlab"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "servicenow"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "notion"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "sharepoint"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "gdrive"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "dropbox"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "onedrive"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "asana"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "linear"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "outline"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "salesforce"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "web_crawler"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "perforce"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "mfiles"
                                ]
                              }
                            ]
                          },
                          "config": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "jira"
                                        ]
                                      },
                                      "jiraBaseUrl": {},
                                      "isCloud": {
                                        "type": "boolean"
                                      },
                                      "projectKey": {
                                        "type": "string"
                                      },
                                      "jqlQuery": {
                                        "type": "string"
                                      },
                                      "commentEmailBlacklist": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "labelsToSkip": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "jiraBaseUrl",
                                      "isCloud"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "confluence"
                                        ]
                                      },
                                      "confluenceUrl": {},
                                      "isCloud": {
                                        "type": "boolean"
                                      },
                                      "spaceKeys": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "pageIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "cqlQuery": {
                                        "type": "string"
                                      },
                                      "labelsToSkip": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "confluenceUrl",
                                      "isCloud"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "github"
                                        ]
                                      },
                                      "githubUrl": {},
                                      "owner": {
                                        "type": "string"
                                      },
                                      "authMethod": {
                                        "type": "string",
                                        "enum": [
                                          "pat",
                                          "github_app"
                                        ]
                                      },
                                      "githubAppConfigId": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              ""
                                            ]
                                          }
                                        ]
                                      },
                                      "repos": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "includeIssues": {
                                        "type": "boolean"
                                      },
                                      "includePullRequests": {
                                        "type": "boolean"
                                      },
                                      "includeRepositoryFiles": {
                                        "type": "boolean"
                                      },
                                      "fileTypes": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "includePaths": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "labelsToSkip": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "githubUrl",
                                      "owner"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "gitlab"
                                        ]
                                      },
                                      "gitlabUrl": {},
                                      "projectIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "number"
                                        }
                                      },
                                      "groupId": {
                                        "type": "string"
                                      },
                                      "includeIssues": {
                                        "type": "boolean"
                                      },
                                      "includeMergeRequests": {
                                        "type": "boolean"
                                      },
                                      "includeMarkdownFiles": {
                                        "type": "boolean"
                                      },
                                      "labelsToSkip": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "gitlabUrl"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "servicenow"
                                        ]
                                      },
                                      "instanceUrl": {},
                                      "includeIncidents": {
                                        "type": "boolean"
                                      },
                                      "includeChanges": {
                                        "type": "boolean"
                                      },
                                      "includeChangeRequests": {
                                        "type": "boolean"
                                      },
                                      "includeProblems": {
                                        "type": "boolean"
                                      },
                                      "includeBusinessApps": {
                                        "type": "boolean"
                                      },
                                      "includeKnowledgeArticles": {
                                        "type": "boolean"
                                      },
                                      "states": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "assignmentGroups": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "roleAudiences": {
                                        "type": "object",
                                        "additionalProperties": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      },
                                      "syncDataForLastMonths": {
                                        "type": "number",
                                        "minimum": 1,
                                        "maximum": 12
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "instanceUrl"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "notion"
                                        ]
                                      },
                                      "databaseIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "pageIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "sharepoint"
                                        ]
                                      },
                                      "tenantId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "siteUrl": {},
                                      "driveIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "folderPath": {
                                        "type": "string"
                                      },
                                      "recursive": {
                                        "type": "boolean"
                                      },
                                      "maxDepth": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                      },
                                      "includePages": {
                                        "type": "boolean"
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "tenantId",
                                      "siteUrl"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "gdrive"
                                        ]
                                      },
                                      "authMode": {
                                        "type": "string",
                                        "enum": [
                                          "service_account",
                                          "service_account_delegated",
                                          "oauth"
                                        ]
                                      },
                                      "delegatedAdminEmail": {
                                        "type": "string"
                                      },
                                      "connectedAccountEmail": {
                                        "type": "string"
                                      },
                                      "driveId": {
                                        "type": "string"
                                      },
                                      "driveIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "folderId": {
                                        "type": "string"
                                      },
                                      "recursive": {
                                        "type": "boolean"
                                      },
                                      "maxDepth": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                      },
                                      "fileTypes": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "dropbox"
                                        ]
                                      },
                                      "rootPath": {
                                        "type": "string"
                                      },
                                      "fileTypes": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      },
                                      "recursive": {
                                        "type": "boolean"
                                      },
                                      "maxDepth": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "onedrive"
                                        ]
                                      },
                                      "tenantId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "userIds": {
                                        "minItems": 1,
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "folderId": {
                                        "type": "string"
                                      },
                                      "recursive": {
                                        "type": "boolean"
                                      },
                                      "maxDepth": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                      },
                                      "fileTypes": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "tenantId",
                                      "userIds"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "asana"
                                        ]
                                      },
                                      "workspaceGid": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "projectGids": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "tagsToSkip": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "workspaceGid"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "linear"
                                        ]
                                      },
                                      "linearApiUrl": {
                                        "default": "https://api.linear.app"
                                      },
                                      "teamIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "projectIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "states": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "includeComments": {
                                        "type": "boolean"
                                      },
                                      "includeProjects": {
                                        "type": "boolean"
                                      },
                                      "includeCycles": {
                                        "type": "boolean"
                                      },
                                      "batchSize": {
                                        "type": "integer",
                                        "exclusiveMinimum": true,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "linearApiUrl"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "outline"
                                        ]
                                      },
                                      "outlineUrl": {},
                                      "collectionIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "batchSize": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "outlineUrl"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "salesforce"
                                        ]
                                      },
                                      "loginUrl": {
                                        "default": "https://login.salesforce.com"
                                      },
                                      "objects": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "advancedObjectConfigJson": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "loginUrl"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "web_crawler"
                                        ]
                                      },
                                      "startUrl": {},
                                      "includePathPrefixes": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "excludePathPatterns": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "contentSelector": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      "excludeSelectors": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        }
                                      },
                                      "maxPages": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 10000
                                      },
                                      "maxDepth": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 50
                                      },
                                      "batchSize": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                      },
                                      "requestDelayMs": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 10000
                                      },
                                      "userAgent": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "allowPrivateNetwork": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "startUrl"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "perforce"
                                        ]
                                      },
                                      "serverUrl": {},
                                      "depotPaths": {
                                        "minItems": 1,
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "excludePaths": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "fileTypes": {
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "pattern": "^\\.?[A-Za-z0-9_-]+$"
                                        }
                                      },
                                      "p4Port": {
                                        "type": "string",
                                        "pattern": "^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"
                                      },
                                      "adminUsername": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "serverUrl",
                                      "depotPaths"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "mfiles"
                                        ]
                                      },
                                      "baseUrl": {},
                                      "vaultGuid": {
                                        "type": "string",
                                        "pattern": "^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
                                      },
                                      "authMethod": {
                                        "type": "string",
                                        "enum": [
                                          "oauth_client_credentials",
                                          "mfiles_password_token"
                                        ]
                                      },
                                      "oauthTokenEndpoint": {},
                                      "oauthScope": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "oauthResource": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "oauthAuthConfig": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "oauthAuthConfigScope": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "oauthAccountName": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "oauthUseIdToken": {
                                        "type": "boolean"
                                      },
                                      "oauthClientAuthMethod": {
                                        "type": "string",
                                        "enum": [
                                          "client_secret_post",
                                          "client_secret_basic"
                                        ]
                                      },
                                      "domain": {
                                        "type": "string"
                                      },
                                      "objectTypeIds": {
                                        "minItems": 1,
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        }
                                      },
                                      "batchSize": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500
                                      },
                                      "permissionExtensionMethod": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "baseUrl",
                                      "vaultGuid"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "secretId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "environmentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "schedule": {
                            "type": "string"
                          },
                          "ftsLanguage": {
                            "$ref": "#/components/schemas/TextSearchLanguage"
                          },
                          "permissionSyncIntervalSeconds": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "lastSyncAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastSyncStatus": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "queued",
                              "running",
                              "success",
                              "completed_with_errors",
                              "no_documents",
                              "failed",
                              "partial",
                              "superseded"
                            ]
                          },
                          "lastSyncError": {
                            "nullable": true,
                            "type": "string"
                          },
                          "lastPermissionSyncAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastPermissionSyncStatus": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "queued",
                              "running",
                              "success",
                              "completed_with_errors",
                              "no_documents",
                              "failed",
                              "partial",
                              "superseded"
                            ]
                          },
                          "checkpoint": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "aclConfigEpoch": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "assignedAgents": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "agentType": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "agentType"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "name",
                          "description",
                          "visibility",
                          "teamIds",
                          "connectorType",
                          "config",
                          "secretId",
                          "environmentId",
                          "schedule",
                          "ftsLanguage",
                          "permissionSyncIntervalSeconds",
                          "enabled",
                          "lastSyncAt",
                          "lastSyncStatus",
                          "lastSyncError",
                          "lastPermissionSyncAt",
                          "lastPermissionSyncStatus",
                          "checkpoint",
                          "aclConfigEpoch",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "assignedAgents"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      },
      "post": {
        "operationId": "createConnector",
        "tags": [
          "Connectors"
        ],
        "description": "Create a new connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:create`: Create Knowledge Bases and Connectors",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "org-wide",
                      "team-scoped",
                      "auto-sync-permissions"
                    ]
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "connectorType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "jira"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "confluence"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "github"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "gitlab"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "servicenow"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "notion"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "sharepoint"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "gdrive"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "dropbox"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "onedrive"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "asana"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "linear"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "outline"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "salesforce"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "web_crawler"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "perforce"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "mfiles"
                        ]
                      }
                    ]
                  },
                  "config": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "jira"
                            ]
                          },
                          "jiraBaseUrl": {
                            "type": "string"
                          },
                          "isCloud": {
                            "type": "boolean"
                          },
                          "projectKey": {
                            "type": "string"
                          },
                          "jqlQuery": {
                            "type": "string"
                          },
                          "commentEmailBlacklist": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "labelsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "jiraBaseUrl",
                          "isCloud"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "confluence"
                            ]
                          },
                          "confluenceUrl": {
                            "type": "string"
                          },
                          "isCloud": {
                            "type": "boolean"
                          },
                          "spaceKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "pageIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "cqlQuery": {
                            "type": "string"
                          },
                          "labelsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "confluenceUrl",
                          "isCloud"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "github"
                            ]
                          },
                          "githubUrl": {
                            "type": "string"
                          },
                          "owner": {
                            "type": "string"
                          },
                          "authMethod": {
                            "type": "string",
                            "enum": [
                              "pat",
                              "github_app"
                            ]
                          },
                          "githubAppConfigId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  ""
                                ]
                              }
                            ]
                          },
                          "repos": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "includeIssues": {
                            "type": "boolean"
                          },
                          "includePullRequests": {
                            "type": "boolean"
                          },
                          "includeRepositoryFiles": {
                            "type": "boolean"
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "includePaths": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "labelsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "githubUrl",
                          "owner"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "gitlab"
                            ]
                          },
                          "gitlabUrl": {
                            "type": "string"
                          },
                          "projectIds": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "groupId": {
                            "type": "string"
                          },
                          "includeIssues": {
                            "type": "boolean"
                          },
                          "includeMergeRequests": {
                            "type": "boolean"
                          },
                          "includeMarkdownFiles": {
                            "type": "boolean"
                          },
                          "labelsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "gitlabUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "servicenow"
                            ]
                          },
                          "instanceUrl": {
                            "type": "string"
                          },
                          "includeIncidents": {
                            "type": "boolean"
                          },
                          "includeChanges": {
                            "type": "boolean"
                          },
                          "includeChangeRequests": {
                            "type": "boolean"
                          },
                          "includeProblems": {
                            "type": "boolean"
                          },
                          "includeBusinessApps": {
                            "type": "boolean"
                          },
                          "includeKnowledgeArticles": {
                            "type": "boolean"
                          },
                          "states": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "assignmentGroups": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "roleAudiences": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          },
                          "syncDataForLastMonths": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 12
                          }
                        },
                        "required": [
                          "type",
                          "instanceUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "notion"
                            ]
                          },
                          "databaseIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "pageIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "sharepoint"
                            ]
                          },
                          "tenantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "siteUrl": {
                            "type": "string"
                          },
                          "driveIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "folderPath": {
                            "type": "string"
                          },
                          "recursive": {
                            "type": "boolean"
                          },
                          "maxDepth": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "includePages": {
                            "type": "boolean"
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "tenantId",
                          "siteUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "gdrive"
                            ]
                          },
                          "authMode": {
                            "type": "string",
                            "enum": [
                              "service_account",
                              "service_account_delegated",
                              "oauth"
                            ]
                          },
                          "delegatedAdminEmail": {
                            "type": "string"
                          },
                          "connectedAccountEmail": {
                            "type": "string"
                          },
                          "driveId": {
                            "type": "string"
                          },
                          "driveIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "folderId": {
                            "type": "string"
                          },
                          "recursive": {
                            "type": "boolean"
                          },
                          "maxDepth": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "dropbox"
                            ]
                          },
                          "rootPath": {
                            "type": "string"
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          },
                          "recursive": {
                            "type": "boolean"
                          },
                          "maxDepth": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "onedrive"
                            ]
                          },
                          "tenantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "userIds": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "folderId": {
                            "type": "string"
                          },
                          "recursive": {
                            "type": "boolean"
                          },
                          "maxDepth": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "tenantId",
                          "userIds"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "asana"
                            ]
                          },
                          "workspaceGid": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectGids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "tagsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "workspaceGid"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "linear"
                            ]
                          },
                          "linearApiUrl": {
                            "type": "string"
                          },
                          "teamIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "projectIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "states": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "includeComments": {
                            "type": "boolean"
                          },
                          "includeProjects": {
                            "type": "boolean"
                          },
                          "includeCycles": {
                            "type": "boolean"
                          },
                          "batchSize": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "outline"
                            ]
                          },
                          "outlineUrl": {
                            "type": "string"
                          },
                          "collectionIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "outlineUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "salesforce"
                            ]
                          },
                          "loginUrl": {
                            "type": "string"
                          },
                          "objects": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "advancedObjectConfigJson": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "web_crawler"
                            ]
                          },
                          "startUrl": {
                            "type": "string"
                          },
                          "includePathPrefixes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "excludePathPatterns": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contentSelector": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "excludeSelectors": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "maxPages": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 10000
                          },
                          "maxDepth": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 50
                          },
                          "batchSize": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "requestDelayMs": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "userAgent": {
                            "type": "string",
                            "minLength": 1
                          },
                          "allowPrivateNetwork": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type",
                          "startUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "perforce"
                            ]
                          },
                          "serverUrl": {
                            "type": "string"
                          },
                          "depotPaths": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 1024
                            }
                          },
                          "excludePaths": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 1024
                            }
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^\\.?[A-Za-z0-9_-]+$"
                            }
                          },
                          "p4Port": {
                            "type": "string",
                            "pattern": "^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"
                          },
                          "adminUsername": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "required": [
                          "type",
                          "serverUrl",
                          "depotPaths"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "mfiles"
                            ]
                          },
                          "baseUrl": {
                            "type": "string"
                          },
                          "vaultGuid": {
                            "type": "string",
                            "pattern": "^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
                          },
                          "authMethod": {
                            "type": "string",
                            "enum": [
                              "oauth_client_credentials",
                              "mfiles_password_token"
                            ]
                          },
                          "oauthTokenEndpoint": {
                            "type": "string"
                          },
                          "oauthScope": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthResource": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthAuthConfig": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthAuthConfigScope": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthAccountName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthUseIdToken": {
                            "type": "boolean"
                          },
                          "oauthClientAuthMethod": {
                            "type": "string",
                            "enum": [
                              "client_secret_post",
                              "client_secret_basic"
                            ]
                          },
                          "domain": {
                            "type": "string"
                          },
                          "objectTypeIds": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "batchSize": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 500
                          },
                          "permissionExtensionMethod": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "baseUrl",
                          "vaultGuid"
                        ]
                      }
                    ]
                  },
                  "credentials": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string"
                      },
                      "apiToken": {
                        "type": "string"
                      },
                      "adminApiKey": {
                        "type": "string"
                      },
                      "githubApp": {
                        "type": "object",
                        "properties": {
                          "githubUrl": {
                            "type": "string"
                          },
                          "appId": {
                            "type": "string"
                          },
                          "installationId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "githubUrl",
                          "appId",
                          "installationId"
                        ]
                      },
                      "googleOAuth": {
                        "type": "object",
                        "properties": {
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "refreshToken": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "clientId",
                          "clientSecret"
                        ]
                      }
                    },
                    "required": [
                      "apiToken"
                    ]
                  },
                  "schedule": {
                    "type": "string"
                  },
                  "ftsLanguage": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/TextSearchLanguageInput"
                      }
                    ]
                  },
                  "permissionSyncIntervalSeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "knowledgeBaseIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "name",
                  "connectorType",
                  "config"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "org-wide",
                        "team-scoped",
                        "auto-sync-permissions"
                      ]
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "jira"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "confluence"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "github"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "gitlab"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "servicenow"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "notion"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "sharepoint"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "gdrive"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "dropbox"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "onedrive"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "asana"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "linear"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "outline"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "salesforce"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "web_crawler"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "perforce"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "mfiles"
                          ]
                        }
                      ]
                    },
                    "config": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "jira"
                              ]
                            },
                            "jiraBaseUrl": {},
                            "isCloud": {
                              "type": "boolean"
                            },
                            "projectKey": {
                              "type": "string"
                            },
                            "jqlQuery": {
                              "type": "string"
                            },
                            "commentEmailBlacklist": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "jiraBaseUrl",
                            "isCloud"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "confluence"
                              ]
                            },
                            "confluenceUrl": {},
                            "isCloud": {
                              "type": "boolean"
                            },
                            "spaceKeys": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "pageIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "cqlQuery": {
                              "type": "string"
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "confluenceUrl",
                            "isCloud"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "github"
                              ]
                            },
                            "githubUrl": {},
                            "owner": {
                              "type": "string"
                            },
                            "authMethod": {
                              "type": "string",
                              "enum": [
                                "pat",
                                "github_app"
                              ]
                            },
                            "githubAppConfigId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    ""
                                  ]
                                }
                              ]
                            },
                            "repos": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includeIssues": {
                              "type": "boolean"
                            },
                            "includePullRequests": {
                              "type": "boolean"
                            },
                            "includeRepositoryFiles": {
                              "type": "boolean"
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includePaths": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "githubUrl",
                            "owner"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "gitlab"
                              ]
                            },
                            "gitlabUrl": {},
                            "projectIds": {
                              "type": "array",
                              "items": {
                                "type": "number"
                              }
                            },
                            "groupId": {
                              "type": "string"
                            },
                            "includeIssues": {
                              "type": "boolean"
                            },
                            "includeMergeRequests": {
                              "type": "boolean"
                            },
                            "includeMarkdownFiles": {
                              "type": "boolean"
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "gitlabUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "servicenow"
                              ]
                            },
                            "instanceUrl": {},
                            "includeIncidents": {
                              "type": "boolean"
                            },
                            "includeChanges": {
                              "type": "boolean"
                            },
                            "includeChangeRequests": {
                              "type": "boolean"
                            },
                            "includeProblems": {
                              "type": "boolean"
                            },
                            "includeBusinessApps": {
                              "type": "boolean"
                            },
                            "includeKnowledgeArticles": {
                              "type": "boolean"
                            },
                            "states": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "assignmentGroups": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "roleAudiences": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            },
                            "syncDataForLastMonths": {
                              "type": "number",
                              "minimum": 1,
                              "maximum": 12
                            }
                          },
                          "required": [
                            "type",
                            "instanceUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "notion"
                              ]
                            },
                            "databaseIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "pageIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "sharepoint"
                              ]
                            },
                            "tenantId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "siteUrl": {},
                            "driveIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderPath": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "includePages": {
                              "type": "boolean"
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "tenantId",
                            "siteUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "gdrive"
                              ]
                            },
                            "authMode": {
                              "type": "string",
                              "enum": [
                                "service_account",
                                "service_account_delegated",
                                "oauth"
                              ]
                            },
                            "delegatedAdminEmail": {
                              "type": "string"
                            },
                            "connectedAccountEmail": {
                              "type": "string"
                            },
                            "driveId": {
                              "type": "string"
                            },
                            "driveIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderId": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "dropbox"
                              ]
                            },
                            "rootPath": {
                              "type": "string"
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "onedrive"
                              ]
                            },
                            "tenantId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "userIds": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderId": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "tenantId",
                            "userIds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "asana"
                              ]
                            },
                            "workspaceGid": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectGids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "tagsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "workspaceGid"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "linear"
                              ]
                            },
                            "linearApiUrl": {
                              "default": "https://api.linear.app"
                            },
                            "teamIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "projectIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "states": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includeComments": {
                              "type": "boolean"
                            },
                            "includeProjects": {
                              "type": "boolean"
                            },
                            "includeCycles": {
                              "type": "boolean"
                            },
                            "batchSize": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "type",
                            "linearApiUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "outline"
                              ]
                            },
                            "outlineUrl": {},
                            "collectionIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "outlineUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "salesforce"
                              ]
                            },
                            "loginUrl": {
                              "default": "https://login.salesforce.com"
                            },
                            "objects": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "advancedObjectConfigJson": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "loginUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_crawler"
                              ]
                            },
                            "startUrl": {},
                            "includePathPrefixes": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "excludePathPatterns": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "contentSelector": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "excludeSelectors": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "maxPages": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10000
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 50
                            },
                            "batchSize": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "requestDelayMs": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "userAgent": {
                              "type": "string",
                              "minLength": 1
                            },
                            "allowPrivateNetwork": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "startUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "perforce"
                              ]
                            },
                            "serverUrl": {},
                            "depotPaths": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "excludePaths": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^\\.?[A-Za-z0-9_-]+$"
                              }
                            },
                            "p4Port": {
                              "type": "string",
                              "pattern": "^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"
                            },
                            "adminUsername": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "type",
                            "serverUrl",
                            "depotPaths"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "mfiles"
                              ]
                            },
                            "baseUrl": {},
                            "vaultGuid": {
                              "type": "string",
                              "pattern": "^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
                            },
                            "authMethod": {
                              "type": "string",
                              "enum": [
                                "oauth_client_credentials",
                                "mfiles_password_token"
                              ]
                            },
                            "oauthTokenEndpoint": {},
                            "oauthScope": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthResource": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAuthConfig": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAuthConfigScope": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAccountName": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthUseIdToken": {
                              "type": "boolean"
                            },
                            "oauthClientAuthMethod": {
                              "type": "string",
                              "enum": [
                                "client_secret_post",
                                "client_secret_basic"
                              ]
                            },
                            "domain": {
                              "type": "string"
                            },
                            "objectTypeIds": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "batchSize": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500
                            },
                            "permissionExtensionMethod": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "type",
                            "baseUrl",
                            "vaultGuid"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "schedule": {
                      "type": "string"
                    },
                    "ftsLanguage": {
                      "$ref": "#/components/schemas/TextSearchLanguage"
                    },
                    "permissionSyncIntervalSeconds": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "lastSyncAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncStatus": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "success",
                        "completed_with_errors",
                        "no_documents",
                        "failed",
                        "partial",
                        "superseded"
                      ]
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "lastPermissionSyncAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastPermissionSyncStatus": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "success",
                        "completed_with_errors",
                        "no_documents",
                        "failed",
                        "partial",
                        "superseded"
                      ]
                    },
                    "checkpoint": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "aclConfigEpoch": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "description",
                    "visibility",
                    "teamIds",
                    "connectorType",
                    "config",
                    "secretId",
                    "environmentId",
                    "schedule",
                    "ftsLanguage",
                    "permissionSyncIntervalSeconds",
                    "enabled",
                    "lastSyncAt",
                    "lastSyncStatus",
                    "lastSyncError",
                    "lastPermissionSyncAt",
                    "lastPermissionSyncStatus",
                    "checkpoint",
                    "aclConfigEpoch",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:create"
          ]
        }
      }
    },
    "/api/connectors/{id}": {
      "get": {
        "operationId": "getConnector",
        "tags": [
          "Connectors"
        ],
        "description": "Get a connector by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "org-wide",
                        "team-scoped",
                        "auto-sync-permissions"
                      ]
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "jira"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "confluence"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "github"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "gitlab"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "servicenow"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "notion"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "sharepoint"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "gdrive"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "dropbox"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "onedrive"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "asana"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "linear"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "outline"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "salesforce"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "web_crawler"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "perforce"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "mfiles"
                          ]
                        }
                      ]
                    },
                    "config": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "jira"
                              ]
                            },
                            "jiraBaseUrl": {},
                            "isCloud": {
                              "type": "boolean"
                            },
                            "projectKey": {
                              "type": "string"
                            },
                            "jqlQuery": {
                              "type": "string"
                            },
                            "commentEmailBlacklist": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "jiraBaseUrl",
                            "isCloud"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "confluence"
                              ]
                            },
                            "confluenceUrl": {},
                            "isCloud": {
                              "type": "boolean"
                            },
                            "spaceKeys": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "pageIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "cqlQuery": {
                              "type": "string"
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "confluenceUrl",
                            "isCloud"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "github"
                              ]
                            },
                            "githubUrl": {},
                            "owner": {
                              "type": "string"
                            },
                            "authMethod": {
                              "type": "string",
                              "enum": [
                                "pat",
                                "github_app"
                              ]
                            },
                            "githubAppConfigId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    ""
                                  ]
                                }
                              ]
                            },
                            "repos": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includeIssues": {
                              "type": "boolean"
                            },
                            "includePullRequests": {
                              "type": "boolean"
                            },
                            "includeRepositoryFiles": {
                              "type": "boolean"
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includePaths": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "githubUrl",
                            "owner"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "gitlab"
                              ]
                            },
                            "gitlabUrl": {},
                            "projectIds": {
                              "type": "array",
                              "items": {
                                "type": "number"
                              }
                            },
                            "groupId": {
                              "type": "string"
                            },
                            "includeIssues": {
                              "type": "boolean"
                            },
                            "includeMergeRequests": {
                              "type": "boolean"
                            },
                            "includeMarkdownFiles": {
                              "type": "boolean"
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "gitlabUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "servicenow"
                              ]
                            },
                            "instanceUrl": {},
                            "includeIncidents": {
                              "type": "boolean"
                            },
                            "includeChanges": {
                              "type": "boolean"
                            },
                            "includeChangeRequests": {
                              "type": "boolean"
                            },
                            "includeProblems": {
                              "type": "boolean"
                            },
                            "includeBusinessApps": {
                              "type": "boolean"
                            },
                            "includeKnowledgeArticles": {
                              "type": "boolean"
                            },
                            "states": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "assignmentGroups": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "roleAudiences": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            },
                            "syncDataForLastMonths": {
                              "type": "number",
                              "minimum": 1,
                              "maximum": 12
                            }
                          },
                          "required": [
                            "type",
                            "instanceUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "notion"
                              ]
                            },
                            "databaseIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "pageIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "sharepoint"
                              ]
                            },
                            "tenantId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "siteUrl": {},
                            "driveIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderPath": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "includePages": {
                              "type": "boolean"
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "tenantId",
                            "siteUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "gdrive"
                              ]
                            },
                            "authMode": {
                              "type": "string",
                              "enum": [
                                "service_account",
                                "service_account_delegated",
                                "oauth"
                              ]
                            },
                            "delegatedAdminEmail": {
                              "type": "string"
                            },
                            "connectedAccountEmail": {
                              "type": "string"
                            },
                            "driveId": {
                              "type": "string"
                            },
                            "driveIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderId": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "dropbox"
                              ]
                            },
                            "rootPath": {
                              "type": "string"
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "onedrive"
                              ]
                            },
                            "tenantId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "userIds": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderId": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "tenantId",
                            "userIds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "asana"
                              ]
                            },
                            "workspaceGid": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectGids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "tagsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "workspaceGid"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "linear"
                              ]
                            },
                            "linearApiUrl": {
                              "default": "https://api.linear.app"
                            },
                            "teamIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "projectIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "states": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includeComments": {
                              "type": "boolean"
                            },
                            "includeProjects": {
                              "type": "boolean"
                            },
                            "includeCycles": {
                              "type": "boolean"
                            },
                            "batchSize": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "type",
                            "linearApiUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "outline"
                              ]
                            },
                            "outlineUrl": {},
                            "collectionIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "outlineUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "salesforce"
                              ]
                            },
                            "loginUrl": {
                              "default": "https://login.salesforce.com"
                            },
                            "objects": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "advancedObjectConfigJson": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "loginUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_crawler"
                              ]
                            },
                            "startUrl": {},
                            "includePathPrefixes": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "excludePathPatterns": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "contentSelector": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "excludeSelectors": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "maxPages": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10000
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 50
                            },
                            "batchSize": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "requestDelayMs": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "userAgent": {
                              "type": "string",
                              "minLength": 1
                            },
                            "allowPrivateNetwork": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "startUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "perforce"
                              ]
                            },
                            "serverUrl": {},
                            "depotPaths": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "excludePaths": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^\\.?[A-Za-z0-9_-]+$"
                              }
                            },
                            "p4Port": {
                              "type": "string",
                              "pattern": "^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"
                            },
                            "adminUsername": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "type",
                            "serverUrl",
                            "depotPaths"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "mfiles"
                              ]
                            },
                            "baseUrl": {},
                            "vaultGuid": {
                              "type": "string",
                              "pattern": "^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
                            },
                            "authMethod": {
                              "type": "string",
                              "enum": [
                                "oauth_client_credentials",
                                "mfiles_password_token"
                              ]
                            },
                            "oauthTokenEndpoint": {},
                            "oauthScope": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthResource": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAuthConfig": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAuthConfigScope": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAccountName": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthUseIdToken": {
                              "type": "boolean"
                            },
                            "oauthClientAuthMethod": {
                              "type": "string",
                              "enum": [
                                "client_secret_post",
                                "client_secret_basic"
                              ]
                            },
                            "domain": {
                              "type": "string"
                            },
                            "objectTypeIds": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "batchSize": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500
                            },
                            "permissionExtensionMethod": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "type",
                            "baseUrl",
                            "vaultGuid"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "schedule": {
                      "type": "string"
                    },
                    "ftsLanguage": {
                      "$ref": "#/components/schemas/TextSearchLanguage"
                    },
                    "permissionSyncIntervalSeconds": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "lastSyncAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncStatus": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "success",
                        "completed_with_errors",
                        "no_documents",
                        "failed",
                        "partial",
                        "superseded"
                      ]
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "lastPermissionSyncAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastPermissionSyncStatus": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "success",
                        "completed_with_errors",
                        "no_documents",
                        "failed",
                        "partial",
                        "superseded"
                      ]
                    },
                    "checkpoint": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "aclConfigEpoch": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "totalDocsIngested": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "description",
                    "visibility",
                    "teamIds",
                    "connectorType",
                    "config",
                    "secretId",
                    "environmentId",
                    "schedule",
                    "ftsLanguage",
                    "permissionSyncIntervalSeconds",
                    "enabled",
                    "lastSyncAt",
                    "lastSyncStatus",
                    "lastSyncError",
                    "lastPermissionSyncAt",
                    "lastPermissionSyncStatus",
                    "checkpoint",
                    "aclConfigEpoch",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "totalDocsIngested"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      },
      "put": {
        "operationId": "updateConnector",
        "tags": [
          "Connectors"
        ],
        "description": "Update a connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:update`: Modify Knowledge Bases and Connectors",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "nullable": true,
                    "type": "string"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "org-wide",
                      "team-scoped",
                      "auto-sync-permissions"
                    ]
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "config": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "jira"
                            ]
                          },
                          "jiraBaseUrl": {
                            "type": "string"
                          },
                          "isCloud": {
                            "type": "boolean"
                          },
                          "projectKey": {
                            "type": "string"
                          },
                          "jqlQuery": {
                            "type": "string"
                          },
                          "commentEmailBlacklist": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "labelsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "jiraBaseUrl",
                          "isCloud"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "confluence"
                            ]
                          },
                          "confluenceUrl": {
                            "type": "string"
                          },
                          "isCloud": {
                            "type": "boolean"
                          },
                          "spaceKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "pageIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "cqlQuery": {
                            "type": "string"
                          },
                          "labelsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "confluenceUrl",
                          "isCloud"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "github"
                            ]
                          },
                          "githubUrl": {
                            "type": "string"
                          },
                          "owner": {
                            "type": "string"
                          },
                          "authMethod": {
                            "type": "string",
                            "enum": [
                              "pat",
                              "github_app"
                            ]
                          },
                          "githubAppConfigId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              {
                                "type": "string",
                                "enum": [
                                  ""
                                ]
                              }
                            ]
                          },
                          "repos": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "includeIssues": {
                            "type": "boolean"
                          },
                          "includePullRequests": {
                            "type": "boolean"
                          },
                          "includeRepositoryFiles": {
                            "type": "boolean"
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "includePaths": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "labelsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "githubUrl",
                          "owner"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "gitlab"
                            ]
                          },
                          "gitlabUrl": {
                            "type": "string"
                          },
                          "projectIds": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "groupId": {
                            "type": "string"
                          },
                          "includeIssues": {
                            "type": "boolean"
                          },
                          "includeMergeRequests": {
                            "type": "boolean"
                          },
                          "includeMarkdownFiles": {
                            "type": "boolean"
                          },
                          "labelsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "gitlabUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "servicenow"
                            ]
                          },
                          "instanceUrl": {
                            "type": "string"
                          },
                          "includeIncidents": {
                            "type": "boolean"
                          },
                          "includeChanges": {
                            "type": "boolean"
                          },
                          "includeChangeRequests": {
                            "type": "boolean"
                          },
                          "includeProblems": {
                            "type": "boolean"
                          },
                          "includeBusinessApps": {
                            "type": "boolean"
                          },
                          "includeKnowledgeArticles": {
                            "type": "boolean"
                          },
                          "states": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "assignmentGroups": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "roleAudiences": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          },
                          "syncDataForLastMonths": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 12
                          }
                        },
                        "required": [
                          "type",
                          "instanceUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "notion"
                            ]
                          },
                          "databaseIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "pageIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "sharepoint"
                            ]
                          },
                          "tenantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "siteUrl": {
                            "type": "string"
                          },
                          "driveIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "folderPath": {
                            "type": "string"
                          },
                          "recursive": {
                            "type": "boolean"
                          },
                          "maxDepth": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "includePages": {
                            "type": "boolean"
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "tenantId",
                          "siteUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "gdrive"
                            ]
                          },
                          "authMode": {
                            "type": "string",
                            "enum": [
                              "service_account",
                              "service_account_delegated",
                              "oauth"
                            ]
                          },
                          "delegatedAdminEmail": {
                            "type": "string"
                          },
                          "connectedAccountEmail": {
                            "type": "string"
                          },
                          "driveId": {
                            "type": "string"
                          },
                          "driveIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "folderId": {
                            "type": "string"
                          },
                          "recursive": {
                            "type": "boolean"
                          },
                          "maxDepth": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "dropbox"
                            ]
                          },
                          "rootPath": {
                            "type": "string"
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          },
                          "recursive": {
                            "type": "boolean"
                          },
                          "maxDepth": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "onedrive"
                            ]
                          },
                          "tenantId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "userIds": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "folderId": {
                            "type": "string"
                          },
                          "recursive": {
                            "type": "boolean"
                          },
                          "maxDepth": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "tenantId",
                          "userIds"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "asana"
                            ]
                          },
                          "workspaceGid": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectGids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "tagsToSkip": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "type",
                          "workspaceGid"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "linear"
                            ]
                          },
                          "linearApiUrl": {
                            "type": "string"
                          },
                          "teamIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "projectIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "states": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "includeComments": {
                            "type": "boolean"
                          },
                          "includeProjects": {
                            "type": "boolean"
                          },
                          "includeCycles": {
                            "type": "boolean"
                          },
                          "batchSize": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "outline"
                            ]
                          },
                          "outlineUrl": {
                            "type": "string"
                          },
                          "collectionIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "batchSize": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "type",
                          "outlineUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "salesforce"
                            ]
                          },
                          "loginUrl": {
                            "type": "string"
                          },
                          "objects": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "advancedObjectConfigJson": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "web_crawler"
                            ]
                          },
                          "startUrl": {
                            "type": "string"
                          },
                          "includePathPrefixes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "excludePathPatterns": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "contentSelector": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "excludeSelectors": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "maxPages": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 10000
                          },
                          "maxDepth": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 50
                          },
                          "batchSize": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "requestDelayMs": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000
                          },
                          "userAgent": {
                            "type": "string",
                            "minLength": 1
                          },
                          "allowPrivateNetwork": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type",
                          "startUrl"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "perforce"
                            ]
                          },
                          "serverUrl": {
                            "type": "string"
                          },
                          "depotPaths": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 1024
                            }
                          },
                          "excludePaths": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 1024
                            }
                          },
                          "fileTypes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^\\.?[A-Za-z0-9_-]+$"
                            }
                          },
                          "p4Port": {
                            "type": "string",
                            "pattern": "^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"
                          },
                          "adminUsername": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "required": [
                          "type",
                          "serverUrl",
                          "depotPaths"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "mfiles"
                            ]
                          },
                          "baseUrl": {
                            "type": "string"
                          },
                          "vaultGuid": {
                            "type": "string",
                            "pattern": "^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
                          },
                          "authMethod": {
                            "type": "string",
                            "enum": [
                              "oauth_client_credentials",
                              "mfiles_password_token"
                            ]
                          },
                          "oauthTokenEndpoint": {
                            "type": "string"
                          },
                          "oauthScope": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthResource": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthAuthConfig": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthAuthConfigScope": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthAccountName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "oauthUseIdToken": {
                            "type": "boolean"
                          },
                          "oauthClientAuthMethod": {
                            "type": "string",
                            "enum": [
                              "client_secret_post",
                              "client_secret_basic"
                            ]
                          },
                          "domain": {
                            "type": "string"
                          },
                          "objectTypeIds": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "batchSize": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 500
                          },
                          "permissionExtensionMethod": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "baseUrl",
                          "vaultGuid"
                        ]
                      }
                    ]
                  },
                  "credentials": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string"
                      },
                      "apiToken": {
                        "type": "string"
                      },
                      "adminApiKey": {
                        "type": "string"
                      },
                      "githubApp": {
                        "type": "object",
                        "properties": {
                          "githubUrl": {
                            "type": "string"
                          },
                          "appId": {
                            "type": "string"
                          },
                          "installationId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "githubUrl",
                          "appId",
                          "installationId"
                        ]
                      },
                      "googleOAuth": {
                        "type": "object",
                        "properties": {
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "refreshToken": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "clientId",
                          "clientSecret"
                        ]
                      }
                    }
                  },
                  "schedule": {
                    "type": "string"
                  },
                  "ftsLanguage": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/TextSearchLanguageInput"
                      }
                    ]
                  },
                  "permissionSyncIntervalSeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "environmentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "org-wide",
                        "team-scoped",
                        "auto-sync-permissions"
                      ]
                    },
                    "teamIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectorType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "jira"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "confluence"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "github"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "gitlab"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "servicenow"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "notion"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "sharepoint"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "gdrive"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "dropbox"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "onedrive"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "asana"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "linear"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "outline"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "salesforce"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "web_crawler"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "perforce"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "mfiles"
                          ]
                        }
                      ]
                    },
                    "config": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "jira"
                              ]
                            },
                            "jiraBaseUrl": {},
                            "isCloud": {
                              "type": "boolean"
                            },
                            "projectKey": {
                              "type": "string"
                            },
                            "jqlQuery": {
                              "type": "string"
                            },
                            "commentEmailBlacklist": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "jiraBaseUrl",
                            "isCloud"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "confluence"
                              ]
                            },
                            "confluenceUrl": {},
                            "isCloud": {
                              "type": "boolean"
                            },
                            "spaceKeys": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "pageIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "cqlQuery": {
                              "type": "string"
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "confluenceUrl",
                            "isCloud"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "github"
                              ]
                            },
                            "githubUrl": {},
                            "owner": {
                              "type": "string"
                            },
                            "authMethod": {
                              "type": "string",
                              "enum": [
                                "pat",
                                "github_app"
                              ]
                            },
                            "githubAppConfigId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                {
                                  "type": "string",
                                  "enum": [
                                    ""
                                  ]
                                }
                              ]
                            },
                            "repos": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includeIssues": {
                              "type": "boolean"
                            },
                            "includePullRequests": {
                              "type": "boolean"
                            },
                            "includeRepositoryFiles": {
                              "type": "boolean"
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includePaths": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "githubUrl",
                            "owner"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "gitlab"
                              ]
                            },
                            "gitlabUrl": {},
                            "projectIds": {
                              "type": "array",
                              "items": {
                                "type": "number"
                              }
                            },
                            "groupId": {
                              "type": "string"
                            },
                            "includeIssues": {
                              "type": "boolean"
                            },
                            "includeMergeRequests": {
                              "type": "boolean"
                            },
                            "includeMarkdownFiles": {
                              "type": "boolean"
                            },
                            "labelsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "gitlabUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "servicenow"
                              ]
                            },
                            "instanceUrl": {},
                            "includeIncidents": {
                              "type": "boolean"
                            },
                            "includeChanges": {
                              "type": "boolean"
                            },
                            "includeChangeRequests": {
                              "type": "boolean"
                            },
                            "includeProblems": {
                              "type": "boolean"
                            },
                            "includeBusinessApps": {
                              "type": "boolean"
                            },
                            "includeKnowledgeArticles": {
                              "type": "boolean"
                            },
                            "states": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "assignmentGroups": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "roleAudiences": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            },
                            "syncDataForLastMonths": {
                              "type": "number",
                              "minimum": 1,
                              "maximum": 12
                            }
                          },
                          "required": [
                            "type",
                            "instanceUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "notion"
                              ]
                            },
                            "databaseIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "pageIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "sharepoint"
                              ]
                            },
                            "tenantId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "siteUrl": {},
                            "driveIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderPath": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "includePages": {
                              "type": "boolean"
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "tenantId",
                            "siteUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "gdrive"
                              ]
                            },
                            "authMode": {
                              "type": "string",
                              "enum": [
                                "service_account",
                                "service_account_delegated",
                                "oauth"
                              ]
                            },
                            "delegatedAdminEmail": {
                              "type": "string"
                            },
                            "connectedAccountEmail": {
                              "type": "string"
                            },
                            "driveId": {
                              "type": "string"
                            },
                            "driveIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderId": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "dropbox"
                              ]
                            },
                            "rootPath": {
                              "type": "string"
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "onedrive"
                              ]
                            },
                            "tenantId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "userIds": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "folderId": {
                              "type": "string"
                            },
                            "recursive": {
                              "type": "boolean"
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "tenantId",
                            "userIds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "asana"
                              ]
                            },
                            "workspaceGid": {
                              "type": "string",
                              "minLength": 1
                            },
                            "projectGids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "tagsToSkip": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "workspaceGid"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "linear"
                              ]
                            },
                            "linearApiUrl": {
                              "default": "https://api.linear.app"
                            },
                            "teamIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "projectIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "states": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "includeComments": {
                              "type": "boolean"
                            },
                            "includeProjects": {
                              "type": "boolean"
                            },
                            "includeCycles": {
                              "type": "boolean"
                            },
                            "batchSize": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "type",
                            "linearApiUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "outline"
                              ]
                            },
                            "outlineUrl": {},
                            "collectionIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "batchSize": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "type",
                            "outlineUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "salesforce"
                              ]
                            },
                            "loginUrl": {
                              "default": "https://login.salesforce.com"
                            },
                            "objects": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "advancedObjectConfigJson": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "loginUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "web_crawler"
                              ]
                            },
                            "startUrl": {},
                            "includePathPrefixes": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "excludePathPatterns": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "contentSelector": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "excludeSelectors": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "maxPages": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10000
                            },
                            "maxDepth": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 50
                            },
                            "batchSize": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "requestDelayMs": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "userAgent": {
                              "type": "string",
                              "minLength": 1
                            },
                            "allowPrivateNetwork": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "startUrl"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "perforce"
                              ]
                            },
                            "serverUrl": {},
                            "depotPaths": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "excludePaths": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "fileTypes": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "pattern": "^\\.?[A-Za-z0-9_-]+$"
                              }
                            },
                            "p4Port": {
                              "type": "string",
                              "pattern": "^(ssl:)?[A-Za-z0-9_.[\\]-]+:\\d{1,5}$"
                            },
                            "adminUsername": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "type",
                            "serverUrl",
                            "depotPaths"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "mfiles"
                              ]
                            },
                            "baseUrl": {},
                            "vaultGuid": {
                              "type": "string",
                              "pattern": "^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$"
                            },
                            "authMethod": {
                              "type": "string",
                              "enum": [
                                "oauth_client_credentials",
                                "mfiles_password_token"
                              ]
                            },
                            "oauthTokenEndpoint": {},
                            "oauthScope": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthResource": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAuthConfig": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAuthConfigScope": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthAccountName": {
                              "type": "string",
                              "minLength": 1
                            },
                            "oauthUseIdToken": {
                              "type": "boolean"
                            },
                            "oauthClientAuthMethod": {
                              "type": "string",
                              "enum": [
                                "client_secret_post",
                                "client_secret_basic"
                              ]
                            },
                            "domain": {
                              "type": "string"
                            },
                            "objectTypeIds": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "batchSize": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500
                            },
                            "permissionExtensionMethod": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "type",
                            "baseUrl",
                            "vaultGuid"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "schedule": {
                      "type": "string"
                    },
                    "ftsLanguage": {
                      "$ref": "#/components/schemas/TextSearchLanguage"
                    },
                    "permissionSyncIntervalSeconds": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "lastSyncAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncStatus": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "success",
                        "completed_with_errors",
                        "no_documents",
                        "failed",
                        "partial",
                        "superseded"
                      ]
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "lastPermissionSyncAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastPermissionSyncStatus": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "success",
                        "completed_with_errors",
                        "no_documents",
                        "failed",
                        "partial",
                        "superseded"
                      ]
                    },
                    "checkpoint": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "aclConfigEpoch": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "description",
                    "visibility",
                    "teamIds",
                    "connectorType",
                    "config",
                    "secretId",
                    "environmentId",
                    "schedule",
                    "ftsLanguage",
                    "permissionSyncIntervalSeconds",
                    "enabled",
                    "lastSyncAt",
                    "lastSyncStatus",
                    "lastSyncError",
                    "lastPermissionSyncAt",
                    "lastPermissionSyncStatus",
                    "checkpoint",
                    "aclConfigEpoch",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteConnector",
        "tags": [
          "Connectors"
        ],
        "description": "Delete a connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:delete`: Delete Knowledge Bases and Connectors, view the deleted ones, and restore them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:delete"
          ]
        }
      }
    },
    "/api/connectors/{id}/documents": {
      "get": {
        "operationId": "getConnectorDocuments",
        "tags": [
          "Connectors"
        ],
        "description": "List documents for a connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "group",
            "required": false,
            "description": "Only documents whose effective audience grants this upstream group (auto-sync-permissions connectors)"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "sourceId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "connectorId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "contentHash": {
                            "type": "string"
                          },
                          "sourceUrl": {
                            "nullable": true,
                            "type": "string"
                          },
                          "acl": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^(org:\\*|team:.+|user_email:.+|group:.+|container:.+)$"
                            }
                          },
                          "metadata": {
                            "nullable": true,
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "embeddingStatus": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "processing",
                              "completed",
                              "failed"
                            ]
                          },
                          "chunkCount": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "connectorType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "jira"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "confluence"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "github"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "gitlab"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "servicenow"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "notion"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "sharepoint"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "gdrive"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "dropbox"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "onedrive"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "asana"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "linear"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "outline"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "salesforce"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "web_crawler"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "perforce"
                                ]
                              },
                              {
                                "type": "string",
                                "enum": [
                                  "mfiles"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "sourceId",
                          "connectorId",
                          "title",
                          "contentHash",
                          "sourceUrl",
                          "acl",
                          "metadata",
                          "embeddingStatus",
                          "chunkCount",
                          "createdAt",
                          "updatedAt",
                          "connectorType"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      }
    },
    "/api/connectors/{id}/documents/{docId}": {
      "get": {
        "operationId": "getConnectorDocument",
        "tags": [
          "Connectors"
        ],
        "description": "Get a single connector document\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "docId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "sourceId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectorId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "contentHash": {
                      "type": "string"
                    },
                    "sourceUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "acl": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^(org:\\*|team:.+|user_email:.+|group:.+|container:.+)$"
                      }
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "embeddingStatus": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "processing",
                        "completed",
                        "failed"
                      ]
                    },
                    "chunkCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "connectorType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "jira"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "confluence"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "github"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "gitlab"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "servicenow"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "notion"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "sharepoint"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "gdrive"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "dropbox"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "onedrive"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "asana"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "linear"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "outline"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "salesforce"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "web_crawler"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "perforce"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "mfiles"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "sourceId",
                    "connectorId",
                    "title",
                    "content",
                    "contentHash",
                    "sourceUrl",
                    "acl",
                    "metadata",
                    "embeddingStatus",
                    "chunkCount",
                    "createdAt",
                    "updatedAt",
                    "connectorType"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      },
      "delete": {
        "operationId": "deleteConnectorDocument",
        "tags": [
          "Connectors"
        ],
        "description": "Delete a connector document\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:delete`: Delete Knowledge Bases and Connectors, view the deleted ones, and restore them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "docId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:delete"
          ]
        }
      }
    },
    "/api/connectors/{id}/restore": {
      "post": {
        "operationId": "restoreConnector",
        "tags": [
          "Connectors"
        ],
        "description": "Restore a soft-deleted connector. The stored credential was destroyed when the connector was deleted, so it is restored DISABLED — re-authenticate, then re-enable it to resume syncing. 404 if there is no soft-deleted connector with that id in the org that the caller may manage — restoring one is gated on the same visibility as editing or deleting it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:delete`: Delete Knowledge Bases and Connectors, view the deleted ones, and restore them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:delete"
          ]
        }
      }
    },
    "/api/connectors/{id}/permanent": {
      "delete": {
        "operationId": "permanentlyDeleteConnector",
        "tags": [
          "Connectors"
        ],
        "description": "Permanently destroy a soft-deleted connector (global admins only — a `knowledgeSource:delete` or `knowledgeSource:admin` grant reaches the trash, not past it). Irreversible, with no grace period: its synced documents and their chunks, run history, access mappings, and assignments are all destroyed. 404 if there is no soft-deleted connector with that id in the org, which is also the answer when it is still live or the caller is not a global admin. Restore wins a race.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:delete`: Delete Knowledge Bases and Connectors, view the deleted ones, and restore them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:delete"
          ]
        }
      }
    },
    "/api/connectors/{id}/sync": {
      "post": {
        "operationId": "syncConnector",
        "tags": [
          "Connectors"
        ],
        "description": "Manually trigger a connector sync\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:update`: Modify Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "taskId",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:update"
          ]
        }
      }
    },
    "/api/connectors/{id}/permission-sync": {
      "post": {
        "operationId": "triggerPermissionSync",
        "tags": [
          "Connectors"
        ],
        "description": "Manually trigger a permission-sync pass for an auto-sync-permissions connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSourceAutoSync:update`: Modify auto-sync-permissions connectors: settings, member mappings, and manual permission syncs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "taskId",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSourceAutoSync:update"
          ]
        }
      }
    },
    "/api/connectors/{id}/permission-coverage": {
      "get": {
        "operationId": "getPermissionSyncCoverage",
        "tags": [
          "Connectors"
        ],
        "description": "Live ACL coverage for an auto-sync-permissions connector: how many ingested documents are tagged vs still fail-closed (awaiting a permission-sync pass)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSourceAutoSync:read`: View auto-sync-permissions connectors: configuration, sync runs, user groups, and member mappings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalDocuments": {
                      "type": "number"
                    },
                    "failClosedDocuments": {
                      "type": "number"
                    },
                    "permissionSyncRunning": {
                      "type": "boolean"
                    },
                    "nextScheduledAt": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "totalDocuments",
                    "failClosedDocuments",
                    "permissionSyncRunning",
                    "nextScheduledAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSourceAutoSync:read"
          ]
        }
      }
    },
    "/api/connectors/{id}/user-groups": {
      "get": {
        "operationId": "getConnectorUserGroups",
        "tags": [
          "Connectors"
        ],
        "description": "Synced external user groups for an auto-sync-permissions connector: each group's member emails, the Archestra org users they resolve to, and how many documents grant the group\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSourceAutoSync:read`: View auto-sync-permissions connectors: configuration, sync runs, user groups, and member mappings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "truncated": {
                      "type": "boolean"
                    },
                    "totalMemberships": {
                      "type": "number"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "groupId": {
                            "type": "string"
                          },
                          "name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "token": {
                            "type": "string"
                          },
                          "documentCount": {
                            "type": "number"
                          },
                          "lastSyncedAt": {
                            "nullable": true,
                            "type": "string"
                          },
                          "members": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "accountId": {
                                  "type": "string"
                                },
                                "displayName": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "email": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "accountType": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "user": {
                                  "nullable": true,
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "email": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "email"
                                  ],
                                  "additionalProperties": false
                                },
                                "resolvedVia": {
                                  "nullable": true,
                                  "type": "string",
                                  "enum": [
                                    "override",
                                    "email"
                                  ]
                                }
                              },
                              "required": [
                                "accountId",
                                "displayName",
                                "email",
                                "accountType",
                                "user",
                                "resolvedVia"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "groupId",
                          "name",
                          "token",
                          "documentCount",
                          "lastSyncedAt",
                          "members"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "truncated",
                    "totalMemberships",
                    "groups"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSourceAutoSync:read"
          ]
        }
      }
    },
    "/api/connectors/{id}/member-overrides": {
      "put": {
        "operationId": "upsertConnectorMemberOverride",
        "tags": [
          "Connectors"
        ],
        "description": "Manually map an upstream member account to an Archestra user for an auto-sync-permissions connector — the admin escape hatch when the upstream hides the member's email from every credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSourceAutoSync:update`: Modify auto-sync-permissions connectors: settings, member mappings, and manual permission syncs",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalAccountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "externalAccountId",
                  "userId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSourceAutoSync:update"
          ]
        }
      }
    },
    "/api/connectors/{id}/member-overrides/{externalAccountId}": {
      "delete": {
        "operationId": "deleteConnectorMemberOverride",
        "tags": [
          "Connectors"
        ],
        "description": "Remove a manual member mapping; the member falls back to email-based resolution (fail-closed when the upstream hides their email)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSourceAutoSync:update`: Modify auto-sync-permissions connectors: settings, member mappings, and manual permission syncs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "path",
            "name": "externalAccountId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSourceAutoSync:update"
          ]
        }
      }
    },
    "/api/connectors/{id}/force-resync": {
      "post": {
        "operationId": "forceResyncConnector",
        "tags": [
          "Connectors"
        ],
        "description": "Force a full re-sync: deletes all documents, chunks, run history, and resets the checkpoint\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:update`: Modify Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "taskId",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:update"
          ]
        }
      }
    },
    "/api/connectors/{id}/test": {
      "post": {
        "operationId": "testConnectorConnection",
        "tags": [
          "Connectors"
        ],
        "description": "Test a connector connection\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      }
    },
    "/api/connectors/{id}/gdrive/oauth/start": {
      "post": {
        "operationId": "startGoogleDriveConnectorOAuth",
        "tags": [
          "Connectors"
        ],
        "description": "Begin the Google authorization-code flow for a Google Drive connector in individual mode. Returns the URL to send the browser to; the connector being authorized travels in a signed state parameter, because Google matches the redirect URI exactly.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:update`: Modify Knowledge Bases and Connectors",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "returnTo": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizationUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "authorizationUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:update"
          ]
        }
      }
    },
    "/api/connectors/gdrive/oauth/callback": {
      "get": {
        "operationId": "completeGoogleDriveConnectorOAuth",
        "tags": [
          "Connectors"
        ],
        "description": "Where Google returns the browser after an individual Google Drive authorization. Requires the session of the person who started the flow: the signed state proves only that this deployment issued a flow, so on its own it would let one person's authorization be redeemed onto another person's connector.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:update`: Modify Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "code",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "state",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "error",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:update"
          ]
        }
      }
    },
    "/api/connectors/{id}/knowledge-bases": {
      "post": {
        "operationId": "assignConnectorToKnowledgeBases",
        "tags": [
          "Connectors"
        ],
        "description": "Assign a connector to one or more knowledge bases\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:update`: Modify Knowledge Bases and Connectors",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "knowledgeBaseIds": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "knowledgeBaseIds"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:update"
          ]
        }
      },
      "get": {
        "operationId": "getConnectorKnowledgeBases",
        "tags": [
          "Connectors"
        ],
        "description": "List knowledge bases assigned to a connector\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "name",
                          "description",
                          "status",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      }
    },
    "/api/connectors/{id}/knowledge-bases/{kbId}": {
      "delete": {
        "operationId": "unassignConnectorFromKnowledgeBase",
        "tags": [
          "Connectors"
        ],
        "description": "Unassign a connector from a knowledge base\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:update`: Modify Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "kbId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:update"
          ]
        }
      }
    },
    "/api/connectors/{id}/runs": {
      "get": {
        "operationId": "getConnectorRuns",
        "tags": [
          "Connectors"
        ],
        "description": "List connector runs\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "content",
                "permission"
              ]
            },
            "in": "query",
            "name": "runType",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "running",
                "success",
                "completed_with_errors",
                "no_documents",
                "failed",
                "partial",
                "superseded"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "changes",
                "no-changes"
              ]
            },
            "in": "query",
            "name": "result",
            "required": false,
            "description": "Only runs that changed something (or nothing)"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "connectorId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "running",
                              "success",
                              "completed_with_errors",
                              "no_documents",
                              "failed",
                              "partial",
                              "superseded"
                            ]
                          },
                          "runType": {
                            "type": "string",
                            "enum": [
                              "content",
                              "permission"
                            ]
                          },
                          "startedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "completedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "documentsProcessed": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "documentsIngested": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "totalItems": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "totalBatches": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "completedBatches": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "itemErrors": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "itemsSkipped": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "documentsWithoutText": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "error": {
                            "nullable": true,
                            "type": "string"
                          },
                          "checkpoint": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "string",
                                    "nullable": true,
                                    "enum": [
                                      null
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "additionalProperties": {}
                              },
                              {
                                "type": "array",
                                "items": {}
                              }
                            ]
                          },
                          "stats": {
                            "nullable": true,
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "full",
                                  "delta"
                                ]
                              },
                              "totalDocs": {
                                "type": "number"
                              },
                              "docsScanned": {
                                "type": "number"
                              },
                              "aclsChanged": {
                                "type": "number"
                              },
                              "chunksRewritten": {
                                "type": "number"
                              },
                              "failClosed": {
                                "type": "number"
                              },
                              "groupsSynced": {
                                "type": "number"
                              },
                              "membershipsUpserted": {
                                "type": "number"
                              },
                              "membershipsRemoved": {
                                "type": "number"
                              },
                              "containersSynced": {
                                "type": "number"
                              },
                              "containersChanged": {
                                "type": "number"
                              },
                              "containerAudienceFailures": {
                                "type": "number"
                              },
                              "docsAdopted": {
                                "type": "number"
                              },
                              "docsReassigned": {
                                "type": "number"
                              },
                              "groupSyncFailed": {
                                "type": "boolean"
                              },
                              "contentSyncActiveDuringRun": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "totalDocs",
                              "docsScanned",
                              "aclsChanged",
                              "chunksRewritten",
                              "failClosed",
                              "groupsSynced",
                              "membershipsUpserted",
                              "contentSyncActiveDuringRun"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "connectorId",
                          "status",
                          "runType",
                          "startedAt",
                          "completedAt",
                          "documentsProcessed",
                          "documentsIngested",
                          "totalItems",
                          "totalBatches",
                          "completedBatches",
                          "itemErrors",
                          "itemsSkipped",
                          "documentsWithoutText",
                          "error",
                          "checkpoint",
                          "stats",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    },
                    "queued": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "boolean"
                        },
                        "permission": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "content",
                        "permission"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination",
                    "queued"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      }
    },
    "/api/connectors/{id}/runs/{runId}": {
      "get": {
        "operationId": "getConnectorRun",
        "tags": [
          "Connectors"
        ],
        "description": "Get a single connector run (including logs)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSource:read`: View Knowledge Bases and Connectors",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "runId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectorId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "success",
                        "completed_with_errors",
                        "no_documents",
                        "failed",
                        "partial",
                        "superseded"
                      ]
                    },
                    "runType": {
                      "type": "string",
                      "enum": [
                        "content",
                        "permission"
                      ]
                    },
                    "startedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "completedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "documentsProcessed": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "documentsIngested": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "totalItems": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "totalBatches": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "completedBatches": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "itemErrors": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "itemsSkipped": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "documentsWithoutText": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "error": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logs": {
                      "nullable": true,
                      "type": "string"
                    },
                    "checkpoint": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "stats": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "delta"
                          ]
                        },
                        "totalDocs": {
                          "type": "number"
                        },
                        "docsScanned": {
                          "type": "number"
                        },
                        "aclsChanged": {
                          "type": "number"
                        },
                        "chunksRewritten": {
                          "type": "number"
                        },
                        "failClosed": {
                          "type": "number"
                        },
                        "groupsSynced": {
                          "type": "number"
                        },
                        "membershipsUpserted": {
                          "type": "number"
                        },
                        "membershipsRemoved": {
                          "type": "number"
                        },
                        "containersSynced": {
                          "type": "number"
                        },
                        "containersChanged": {
                          "type": "number"
                        },
                        "containerAudienceFailures": {
                          "type": "number"
                        },
                        "docsAdopted": {
                          "type": "number"
                        },
                        "docsReassigned": {
                          "type": "number"
                        },
                        "groupSyncFailed": {
                          "type": "boolean"
                        },
                        "contentSyncActiveDuringRun": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "totalDocs",
                        "docsScanned",
                        "aclsChanged",
                        "chunksRewritten",
                        "failClosed",
                        "groupsSynced",
                        "membershipsUpserted",
                        "contentSyncActiveDuringRun"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "connectorId",
                    "status",
                    "runType",
                    "startedAt",
                    "completedAt",
                    "documentsProcessed",
                    "documentsIngested",
                    "totalItems",
                    "totalBatches",
                    "completedBatches",
                    "itemErrors",
                    "itemsSkipped",
                    "documentsWithoutText",
                    "error",
                    "logs",
                    "checkpoint",
                    "stats",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSource:read"
          ]
        }
      }
    },
    "/api/limits": {
      "get": {
        "operationId": "getLimits",
        "tags": [
          "Limits"
        ],
        "description": "Get all limits with optional filtering and per-model usage breakdown\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:read`: View token usage limits",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "organization",
                "team",
                "agent",
                "user",
                "virtual_key",
                "environment"
              ]
            },
            "in": "query",
            "name": "entityType",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "entityId",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "token_cost",
                "mcp_server_calls",
                "tool_calls"
              ]
            },
            "in": "query",
            "name": "limitType",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "entityType": {
                        "type": "string",
                        "enum": [
                          "organization",
                          "team",
                          "agent",
                          "user",
                          "virtual_key",
                          "environment"
                        ]
                      },
                      "entityId": {
                        "type": "string"
                      },
                      "limitType": {
                        "type": "string",
                        "enum": [
                          "token_cost",
                          "mcp_server_calls",
                          "tool_calls"
                        ]
                      },
                      "limitValue": {
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "mcpServerName": {
                        "nullable": true,
                        "type": "string",
                        "maxLength": 255
                      },
                      "toolName": {
                        "nullable": true,
                        "type": "string",
                        "maxLength": 255
                      },
                      "model": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "cleanupInterval": {
                        "type": "string",
                        "enum": [
                          "1h",
                          "12h",
                          "24h",
                          "1w",
                          "1m",
                          "calendar_day",
                          "calendar_week_sunday",
                          "calendar_week_monday",
                          "calendar_month"
                        ]
                      },
                      "lastCleanup": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "modelUsage": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "model": {
                              "type": "string"
                            },
                            "tokensIn": {
                              "type": "number"
                            },
                            "tokensOut": {
                              "type": "number"
                            },
                            "cost": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "model",
                            "tokensIn",
                            "tokensOut",
                            "cost"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "id",
                      "entityType",
                      "entityId",
                      "limitType",
                      "limitValue",
                      "mcpServerName",
                      "toolName",
                      "lastCleanup",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:read"
          ]
        }
      },
      "post": {
        "operationId": "createLimit",
        "tags": [
          "Limits"
        ],
        "description": "Create a new limit\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:create`: Create new usage limits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entityType": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "team",
                      "agent",
                      "user",
                      "virtual_key",
                      "environment"
                    ]
                  },
                  "entityId": {
                    "type": "string"
                  },
                  "limitType": {
                    "type": "string",
                    "enum": [
                      "token_cost",
                      "mcp_server_calls",
                      "tool_calls"
                    ]
                  },
                  "limitValue": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "mcpServerName": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 255
                  },
                  "toolName": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 255
                  },
                  "model": {
                    "nullable": true,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cleanupInterval": {
                    "type": "string",
                    "enum": [
                      "1h",
                      "12h",
                      "24h",
                      "1w",
                      "1m",
                      "calendar_day",
                      "calendar_week_sunday",
                      "calendar_week_monday",
                      "calendar_month"
                    ]
                  },
                  "lastCleanup": {
                    "nullable": true
                  }
                },
                "required": [
                  "entityType",
                  "entityId",
                  "limitType",
                  "limitValue"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "entityType": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "agent",
                        "user",
                        "virtual_key",
                        "environment"
                      ]
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "limitType": {
                      "type": "string",
                      "enum": [
                        "token_cost",
                        "mcp_server_calls",
                        "tool_calls"
                      ]
                    },
                    "limitValue": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "mcpServerName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 255
                    },
                    "toolName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 255
                    },
                    "model": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cleanupInterval": {
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "lastCleanup": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "entityType",
                    "entityId",
                    "limitType",
                    "limitValue",
                    "mcpServerName",
                    "toolName",
                    "lastCleanup",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:create"
          ]
        }
      }
    },
    "/api/limits/{id}": {
      "get": {
        "operationId": "getLimit",
        "tags": [
          "Limits"
        ],
        "description": "Get a limit by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:read`: View token usage limits",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "entityType": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "agent",
                        "user",
                        "virtual_key",
                        "environment"
                      ]
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "limitType": {
                      "type": "string",
                      "enum": [
                        "token_cost",
                        "mcp_server_calls",
                        "tool_calls"
                      ]
                    },
                    "limitValue": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "mcpServerName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 255
                    },
                    "toolName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 255
                    },
                    "model": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cleanupInterval": {
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "lastCleanup": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "modelUsage": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "model": {
                            "type": "string"
                          },
                          "tokensIn": {
                            "type": "number"
                          },
                          "tokensOut": {
                            "type": "number"
                          },
                          "cost": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "model",
                          "tokensIn",
                          "tokensOut",
                          "cost"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "entityType",
                    "entityId",
                    "limitType",
                    "limitValue",
                    "mcpServerName",
                    "toolName",
                    "lastCleanup",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:read"
          ]
        }
      },
      "patch": {
        "operationId": "updateLimit",
        "tags": [
          "Limits"
        ],
        "description": "Update a limit\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:update`: Modify existing usage limits",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limitType": {
                    "type": "string",
                    "enum": [
                      "token_cost",
                      "mcp_server_calls",
                      "tool_calls"
                    ]
                  },
                  "limitValue": {
                    "type": "integer",
                    "minimum": -2147483648,
                    "maximum": 2147483647
                  },
                  "mcpServerName": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 255
                  },
                  "toolName": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 255
                  },
                  "model": {
                    "nullable": true,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cleanupInterval": {
                    "type": "string",
                    "enum": [
                      "1h",
                      "12h",
                      "24h",
                      "1w",
                      "1m",
                      "calendar_day",
                      "calendar_week_sunday",
                      "calendar_week_monday",
                      "calendar_month"
                    ]
                  },
                  "lastCleanup": {
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "entityType": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "agent",
                        "user",
                        "virtual_key",
                        "environment"
                      ]
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "limitType": {
                      "type": "string",
                      "enum": [
                        "token_cost",
                        "mcp_server_calls",
                        "tool_calls"
                      ]
                    },
                    "limitValue": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "mcpServerName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 255
                    },
                    "toolName": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 255
                    },
                    "model": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cleanupInterval": {
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "lastCleanup": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "entityType",
                    "entityId",
                    "limitType",
                    "limitValue",
                    "mcpServerName",
                    "toolName",
                    "lastCleanup",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteLimit",
        "tags": [
          "Limits"
        ],
        "description": "Delete a limit\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmLimit:delete`: Remove usage limits",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmLimit:delete"
          ]
        }
      }
    },
    "/api/llm-models/available": {
      "get": {
        "operationId": "getLlmModels",
        "tags": [
          "LLM Models"
        ],
        "description": "Get available LLM models from configured provider API keys. Models are fetched from the provider-backed catalog and include capabilities when available.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmModel:read`: View synced LLM models and capabilities",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "openai",
                "gemini",
                "anthropic",
                "bedrock",
                "cohere",
                "cerebras",
                "mistral",
                "perplexity",
                "groq",
                "xai",
                "openrouter",
                "vllm",
                "ollama",
                "ollama-native",
                "zhipuai",
                "deepseek",
                "minimax",
                "kimi",
                "azure",
                "github-copilot",
                "microsoft-365-copilot",
                "archestra"
              ]
            },
            "in": "query",
            "name": "provider",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "apiKeyId",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "isEmbedding",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "dbId": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "string",
                        "enum": [
                          "openai",
                          "gemini",
                          "anthropic",
                          "bedrock",
                          "cohere",
                          "cerebras",
                          "mistral",
                          "perplexity",
                          "groq",
                          "xai",
                          "openrouter",
                          "vllm",
                          "ollama",
                          "ollama-native",
                          "zhipuai",
                          "deepseek",
                          "minimax",
                          "kimi",
                          "azure",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "archestra"
                        ]
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "capabilities": {
                        "type": "object",
                        "properties": {
                          "contextLength": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "inputModalities": {
                            "nullable": true,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "text",
                                "image",
                                "audio",
                                "video",
                                "pdf"
                              ]
                            }
                          },
                          "outputModalities": {
                            "nullable": true,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "text",
                                "image",
                                "audio"
                              ]
                            }
                          },
                          "supportsToolCalling": {
                            "nullable": true,
                            "type": "boolean"
                          },
                          "recommendedForAgents": {
                            "nullable": true,
                            "type": "boolean"
                          },
                          "pricePerMillionInput": {
                            "nullable": true,
                            "type": "string"
                          },
                          "pricePerMillionOutput": {
                            "nullable": true,
                            "type": "string"
                          },
                          "isCustomPrice": {
                            "type": "boolean"
                          },
                          "priceSource": {
                            "type": "string",
                            "enum": [
                              "custom",
                              "models_dev",
                              "aws",
                              "derived_multiplier",
                              "default"
                            ]
                          },
                          "pricePerMillionCacheRead": {
                            "nullable": true,
                            "type": "string"
                          },
                          "pricePerMillionCacheWrite": {
                            "nullable": true,
                            "type": "string"
                          },
                          "cachePriceSource": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "custom",
                              "models_dev",
                              "aws",
                              "derived_multiplier",
                              "default"
                            ]
                          }
                        },
                        "required": [
                          "contextLength",
                          "inputModalities",
                          "outputModalities",
                          "supportsToolCalling",
                          "recommendedForAgents",
                          "pricePerMillionInput",
                          "pricePerMillionOutput",
                          "isCustomPrice",
                          "priceSource",
                          "pricePerMillionCacheRead",
                          "pricePerMillionCacheWrite",
                          "cachePriceSource"
                        ],
                        "additionalProperties": false
                      },
                      "isBest": {
                        "type": "boolean"
                      },
                      "isFree": {
                        "type": "boolean"
                      },
                      "embeddingDimensions": {
                        "nullable": true,
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/EmbeddingDimensions"
                          }
                        ]
                      },
                      "requiresUserConnection": {
                        "type": "boolean"
                      },
                      "isConnected": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "dbId",
                      "displayName",
                      "provider",
                      "isFree"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmModel:read"
          ]
        }
      }
    },
    "/api/llm-models/sync": {
      "post": {
        "operationId": "syncLlmModels",
        "tags": [
          "LLM Models"
        ],
        "description": "Sync models from providers for all visible API keys and store them in the database\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmModel:update`: Modify LLM model pricing, modality and generation-parameter settings",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmModel:update"
          ]
        }
      }
    },
    "/api/llm-models": {
      "get": {
        "operationId": "getModelsWithApiKeys",
        "tags": [
          "LLM Models"
        ],
        "description": "Get all synced LLM models with their linked provider API keys.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmModel:read`: View synced LLM models and capabilities",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "externalId": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "string",
                        "enum": [
                          "openai",
                          "gemini",
                          "anthropic",
                          "bedrock",
                          "cohere",
                          "cerebras",
                          "mistral",
                          "perplexity",
                          "groq",
                          "xai",
                          "openrouter",
                          "vllm",
                          "ollama",
                          "ollama-native",
                          "zhipuai",
                          "deepseek",
                          "minimax",
                          "kimi",
                          "azure",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "archestra"
                        ]
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "contextLength": {
                        "nullable": true,
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "outputLength": {
                        "nullable": true,
                        "type": "integer",
                        "minimum": -2147483648,
                        "maximum": 2147483647
                      },
                      "inputModalities": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "text",
                            "image",
                            "audio",
                            "video",
                            "pdf"
                          ]
                        }
                      },
                      "outputModalities": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "text",
                            "image",
                            "audio"
                          ]
                        }
                      },
                      "supportsToolCalling": {
                        "nullable": true,
                        "type": "boolean"
                      },
                      "supportedEndpoints": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "promptPricePerToken": {
                        "nullable": true,
                        "type": "string"
                      },
                      "completionPricePerToken": {
                        "nullable": true,
                        "type": "string"
                      },
                      "cacheReadPricePerToken": {
                        "nullable": true,
                        "type": "string"
                      },
                      "cacheWritePricePerToken": {
                        "nullable": true,
                        "type": "string"
                      },
                      "customPricePerMillionInput": {
                        "nullable": true,
                        "type": "string"
                      },
                      "customPricePerMillionOutput": {
                        "nullable": true,
                        "type": "string"
                      },
                      "customPricePerMillionCacheRead": {
                        "nullable": true,
                        "type": "string"
                      },
                      "customPricePerMillionCacheWrite": {
                        "nullable": true,
                        "type": "string"
                      },
                      "ignored": {
                        "type": "boolean"
                      },
                      "embeddingDimensions": {
                        "nullable": true,
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/EmbeddingDimensions"
                          }
                        ]
                      },
                      "defaultParameters": {
                        "nullable": true,
                        "type": "object",
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        }
                      },
                      "configuredParameters": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "temperature": {
                            "type": "number",
                            "minimum": 0
                          },
                          "top_p": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "top_k": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "repeat_penalty": {
                            "type": "number",
                            "minimum": 0
                          },
                          "seed": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "stop": {
                            "maxItems": 16,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "maxLength": 256
                            }
                          },
                          "num_ctx": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 10000000
                          },
                          "num_predict": {
                            "type": "integer",
                            "minimum": -2,
                            "maximum": 9007199254740991
                          },
                          "reasoning_effort": {
                            "type": "string",
                            "enum": [
                              "none",
                              "low",
                              "medium",
                              "high"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "discoveredViaLlmProxy": {
                        "type": "boolean"
                      },
                      "lastSyncedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "isBest": {
                        "type": "boolean"
                      },
                      "apiKeys": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "name": {
                              "type": "string"
                            },
                            "provider": {
                              "type": "string"
                            },
                            "scope": {
                              "type": "string"
                            },
                            "isSystem": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "provider",
                            "scope",
                            "isSystem"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "teams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "users": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "email"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "pricePerMillionInput": {
                        "nullable": true,
                        "type": "string"
                      },
                      "pricePerMillionOutput": {
                        "nullable": true,
                        "type": "string"
                      },
                      "isCustomPrice": {
                        "type": "boolean"
                      },
                      "priceSource": {
                        "type": "string",
                        "enum": [
                          "custom",
                          "models_dev",
                          "aws",
                          "derived_multiplier",
                          "default"
                        ]
                      },
                      "pricePerMillionCacheRead": {
                        "nullable": true,
                        "type": "string"
                      },
                      "pricePerMillionCacheWrite": {
                        "nullable": true,
                        "type": "string"
                      },
                      "cachePriceSource": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "custom",
                          "models_dev",
                          "aws",
                          "derived_multiplier",
                          "default"
                        ]
                      },
                      "isFree": {
                        "type": "boolean"
                      },
                      "effectiveContextLength": {
                        "nullable": true,
                        "type": "number"
                      },
                      "embeddingClientImageCapable": {
                        "nullable": true,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "externalId",
                      "provider",
                      "modelId",
                      "description",
                      "contextLength",
                      "outputLength",
                      "inputModalities",
                      "outputModalities",
                      "supportsToolCalling",
                      "supportedEndpoints",
                      "promptPricePerToken",
                      "completionPricePerToken",
                      "cacheReadPricePerToken",
                      "cacheWritePricePerToken",
                      "customPricePerMillionInput",
                      "customPricePerMillionOutput",
                      "customPricePerMillionCacheRead",
                      "customPricePerMillionCacheWrite",
                      "ignored",
                      "embeddingDimensions",
                      "defaultParameters",
                      "configuredParameters",
                      "discoveredViaLlmProxy",
                      "lastSyncedAt",
                      "createdAt",
                      "updatedAt",
                      "isBest",
                      "apiKeys",
                      "teams",
                      "users",
                      "pricePerMillionInput",
                      "pricePerMillionOutput",
                      "isCustomPrice",
                      "priceSource",
                      "pricePerMillionCacheRead",
                      "pricePerMillionCacheWrite",
                      "cachePriceSource",
                      "isFree",
                      "effectiveContextLength",
                      "embeddingClientImageCapable"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmModel:read"
          ]
        }
      }
    },
    "/api/llm-models/{id}": {
      "patch": {
        "operationId": "updateModel",
        "tags": [
          "LLM Models"
        ],
        "description": "Update LLM model details including custom pricing and modalities.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmModel:update`: Modify LLM model pricing, modality and generation-parameter settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customPricePerMillionInput": {
                    "nullable": true,
                    "type": "string"
                  },
                  "customPricePerMillionOutput": {
                    "nullable": true,
                    "type": "string"
                  },
                  "customPricePerMillionCacheRead": {
                    "nullable": true,
                    "type": "string"
                  },
                  "customPricePerMillionCacheWrite": {
                    "nullable": true,
                    "type": "string"
                  },
                  "ignored": {
                    "type": "boolean"
                  },
                  "embeddingDimensions": {
                    "nullable": true,
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/EmbeddingDimensionsInput"
                      }
                    ]
                  },
                  "inputModalities": {
                    "nullable": true,
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "text",
                        "image",
                        "audio",
                        "video",
                        "pdf"
                      ]
                    }
                  },
                  "outputModalities": {
                    "nullable": true,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "text",
                        "image",
                        "audio"
                      ]
                    }
                  },
                  "configuredParameters": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "temperature": {
                        "type": "number",
                        "minimum": 0
                      },
                      "top_p": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "top_k": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "repeat_penalty": {
                        "type": "number",
                        "minimum": 0
                      },
                      "seed": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "stop": {
                        "maxItems": 16,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 256
                        }
                      },
                      "num_ctx": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      },
                      "num_predict": {
                        "type": "integer",
                        "minimum": -2,
                        "maximum": 9007199254740991
                      },
                      "reasoning_effort": {
                        "type": "string",
                        "enum": [
                          "none",
                          "low",
                          "medium",
                          "high"
                        ]
                      }
                    }
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "userIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "contextLength": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "outputLength": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "inputModalities": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "text",
                          "image",
                          "audio",
                          "video",
                          "pdf"
                        ]
                      }
                    },
                    "outputModalities": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "text",
                          "image",
                          "audio"
                        ]
                      }
                    },
                    "supportsToolCalling": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "supportedEndpoints": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "promptPricePerToken": {
                      "nullable": true,
                      "type": "string"
                    },
                    "completionPricePerToken": {
                      "nullable": true,
                      "type": "string"
                    },
                    "cacheReadPricePerToken": {
                      "nullable": true,
                      "type": "string"
                    },
                    "cacheWritePricePerToken": {
                      "nullable": true,
                      "type": "string"
                    },
                    "customPricePerMillionInput": {
                      "nullable": true,
                      "type": "string"
                    },
                    "customPricePerMillionOutput": {
                      "nullable": true,
                      "type": "string"
                    },
                    "customPricePerMillionCacheRead": {
                      "nullable": true,
                      "type": "string"
                    },
                    "customPricePerMillionCacheWrite": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ignored": {
                      "type": "boolean"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "defaultParameters": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        ]
                      }
                    },
                    "configuredParameters": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "temperature": {
                          "type": "number",
                          "minimum": 0
                        },
                        "top_p": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "top_k": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "repeat_penalty": {
                          "type": "number",
                          "minimum": 0
                        },
                        "seed": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "stop": {
                          "maxItems": 16,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 256
                          }
                        },
                        "num_ctx": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000000
                        },
                        "num_predict": {
                          "type": "integer",
                          "minimum": -2,
                          "maximum": 9007199254740991
                        },
                        "reasoning_effort": {
                          "type": "string",
                          "enum": [
                            "none",
                            "low",
                            "medium",
                            "high"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "discoveredViaLlmProxy": {
                      "type": "boolean"
                    },
                    "lastSyncedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "externalId",
                    "provider",
                    "modelId",
                    "description",
                    "contextLength",
                    "outputLength",
                    "inputModalities",
                    "outputModalities",
                    "supportsToolCalling",
                    "supportedEndpoints",
                    "promptPricePerToken",
                    "completionPricePerToken",
                    "cacheReadPricePerToken",
                    "cacheWritePricePerToken",
                    "customPricePerMillionInput",
                    "customPricePerMillionOutput",
                    "customPricePerMillionCacheRead",
                    "customPricePerMillionCacheWrite",
                    "ignored",
                    "embeddingDimensions",
                    "defaultParameters",
                    "configuredParameters",
                    "discoveredViaLlmProxy",
                    "lastSyncedAt",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmModel:update"
          ]
        }
      }
    },
    "/api/llm-oauth-clients": {
      "get": {
        "operationId": "getLlmOauthClients",
        "tags": [
          "LLM OAuth Clients"
        ],
        "description": "List LLM OAuth clients that can access LLM proxies\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmOauthClient:read`: View LLM OAuth client registrations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "providerApiKeyId",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "clientId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "grantType": {
                        "type": "string",
                        "enum": [
                          "client_credentials",
                          "authorization_code"
                        ]
                      },
                      "allowedLlmProxyIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "providerApiKeys": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "provider": {
                              "type": "string",
                              "enum": [
                                "openai",
                                "gemini",
                                "anthropic",
                                "bedrock",
                                "cohere",
                                "cerebras",
                                "mistral",
                                "perplexity",
                                "groq",
                                "xai",
                                "openrouter",
                                "vllm",
                                "ollama",
                                "ollama-native",
                                "zhipuai",
                                "deepseek",
                                "minimax",
                                "kimi",
                                "azure",
                                "github-copilot",
                                "microsoft-365-copilot",
                                "archestra"
                              ]
                            },
                            "providerApiKeyId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "providerApiKeyName": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "provider",
                            "providerApiKeyId",
                            "providerApiKeyName"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "redirectUris": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "disabled": {
                        "type": "boolean"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ]
                      },
                      "authorId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "authorName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "teams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "clientId",
                      "name",
                      "organizationId",
                      "grantType",
                      "allowedLlmProxyIds",
                      "providerApiKeys",
                      "redirectUris",
                      "disabled",
                      "scope",
                      "authorId",
                      "authorName",
                      "teams",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmOauthClient:read"
          ]
        }
      },
      "post": {
        "operationId": "createLlmOauthClient",
        "tags": [
          "LLM OAuth Clients"
        ],
        "description": "Create an LLM OAuth client and return its client secret once\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmOauthClient:create`: Create LLM OAuth client registrations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "grantType": {
                    "default": "client_credentials",
                    "type": "string",
                    "enum": [
                      "client_credentials",
                      "authorization_code"
                    ]
                  },
                  "allowedLlmProxyIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "providerApiKeys": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "openai",
                            "gemini",
                            "anthropic",
                            "bedrock",
                            "cohere",
                            "cerebras",
                            "mistral",
                            "perplexity",
                            "groq",
                            "xai",
                            "openrouter",
                            "vllm",
                            "ollama",
                            "ollama-native",
                            "zhipuai",
                            "deepseek",
                            "minimax",
                            "kimi",
                            "azure",
                            "github-copilot",
                            "microsoft-365-copilot",
                            "archestra"
                          ]
                        },
                        "providerApiKeyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "provider",
                        "providerApiKeyId"
                      ]
                    }
                  },
                  "redirectUris": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "grantType": {
                      "type": "string",
                      "enum": [
                        "client_credentials",
                        "authorization_code"
                      ]
                    },
                    "allowedLlmProxyIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "providerApiKeys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "gemini",
                              "anthropic",
                              "bedrock",
                              "cohere",
                              "cerebras",
                              "mistral",
                              "perplexity",
                              "groq",
                              "xai",
                              "openrouter",
                              "vllm",
                              "ollama",
                              "ollama-native",
                              "zhipuai",
                              "deepseek",
                              "minimax",
                              "kimi",
                              "azure",
                              "github-copilot",
                              "microsoft-365-copilot",
                              "archestra"
                            ]
                          },
                          "providerApiKeyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "providerApiKeyName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "provider",
                          "providerApiKeyId",
                          "providerApiKeyName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "redirectUris": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "clientSecret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "clientId",
                    "name",
                    "organizationId",
                    "grantType",
                    "allowedLlmProxyIds",
                    "providerApiKeys",
                    "redirectUris",
                    "disabled",
                    "scope",
                    "authorId",
                    "authorName",
                    "teams",
                    "createdAt",
                    "updatedAt",
                    "clientSecret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmOauthClient:create"
          ]
        }
      }
    },
    "/api/llm-oauth-clients/{id}": {
      "put": {
        "operationId": "updateLlmOauthClient",
        "tags": [
          "LLM OAuth Clients"
        ],
        "description": "Update an LLM OAuth client\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmOauthClient:update`: Modify LLM OAuth client registrations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "grantType": {
                    "default": "client_credentials",
                    "type": "string",
                    "enum": [
                      "client_credentials",
                      "authorization_code"
                    ]
                  },
                  "allowedLlmProxyIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "providerApiKeys": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "openai",
                            "gemini",
                            "anthropic",
                            "bedrock",
                            "cohere",
                            "cerebras",
                            "mistral",
                            "perplexity",
                            "groq",
                            "xai",
                            "openrouter",
                            "vllm",
                            "ollama",
                            "ollama-native",
                            "zhipuai",
                            "deepseek",
                            "minimax",
                            "kimi",
                            "azure",
                            "github-copilot",
                            "microsoft-365-copilot",
                            "archestra"
                          ]
                        },
                        "providerApiKeyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "provider",
                        "providerApiKeyId"
                      ]
                    }
                  },
                  "redirectUris": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "grantType": {
                      "type": "string",
                      "enum": [
                        "client_credentials",
                        "authorization_code"
                      ]
                    },
                    "allowedLlmProxyIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "providerApiKeys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "gemini",
                              "anthropic",
                              "bedrock",
                              "cohere",
                              "cerebras",
                              "mistral",
                              "perplexity",
                              "groq",
                              "xai",
                              "openrouter",
                              "vllm",
                              "ollama",
                              "ollama-native",
                              "zhipuai",
                              "deepseek",
                              "minimax",
                              "kimi",
                              "azure",
                              "github-copilot",
                              "microsoft-365-copilot",
                              "archestra"
                            ]
                          },
                          "providerApiKeyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "providerApiKeyName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "provider",
                          "providerApiKeyId",
                          "providerApiKeyName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "redirectUris": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "clientId",
                    "name",
                    "organizationId",
                    "grantType",
                    "allowedLlmProxyIds",
                    "providerApiKeys",
                    "redirectUris",
                    "disabled",
                    "scope",
                    "authorId",
                    "authorName",
                    "teams",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmOauthClient:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteLlmOauthClient",
        "tags": [
          "LLM OAuth Clients"
        ],
        "description": "Delete an LLM OAuth client\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmOauthClient:delete`: Delete LLM OAuth client registrations",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmOauthClient:delete"
          ]
        }
      }
    },
    "/api/llm-oauth-clients/{id}/rotate-secret": {
      "post": {
        "operationId": "rotateLlmOauthClientSecret",
        "tags": [
          "LLM OAuth Clients"
        ],
        "description": "Rotate an LLM OAuth client's client secret\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmOauthClient:update`: Modify LLM OAuth client registrations",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "grantType": {
                      "type": "string",
                      "enum": [
                        "client_credentials",
                        "authorization_code"
                      ]
                    },
                    "allowedLlmProxyIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "providerApiKeys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "gemini",
                              "anthropic",
                              "bedrock",
                              "cohere",
                              "cerebras",
                              "mistral",
                              "perplexity",
                              "groq",
                              "xai",
                              "openrouter",
                              "vllm",
                              "ollama",
                              "ollama-native",
                              "zhipuai",
                              "deepseek",
                              "minimax",
                              "kimi",
                              "azure",
                              "github-copilot",
                              "microsoft-365-copilot",
                              "archestra"
                            ]
                          },
                          "providerApiKeyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "providerApiKeyName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "provider",
                          "providerApiKeyId",
                          "providerApiKeyName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "redirectUris": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "clientSecret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "clientId",
                    "name",
                    "organizationId",
                    "grantType",
                    "allowedLlmProxyIds",
                    "providerApiKeys",
                    "redirectUris",
                    "disabled",
                    "scope",
                    "authorId",
                    "authorName",
                    "teams",
                    "createdAt",
                    "updatedAt",
                    "clientSecret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmOauthClient:update"
          ]
        }
      }
    },
    "/api/llm-provider-api-keys": {
      "get": {
        "operationId": "getLlmProviderApiKeys",
        "tags": [
          "LLM Provider API Keys"
        ],
        "description": "Get all LLM provider API keys visible to the current user based on scope access\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmProviderApiKey:read`: View LLM provider API keys",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "openai",
                "gemini",
                "anthropic",
                "bedrock",
                "cohere",
                "cerebras",
                "mistral",
                "perplexity",
                "groq",
                "xai",
                "openrouter",
                "vllm",
                "ollama",
                "ollama-native",
                "zhipuai",
                "deepseek",
                "minimax",
                "kimi",
                "azure",
                "github-copilot",
                "microsoft-365-copilot",
                "archestra"
              ]
            },
            "in": "query",
            "name": "provider",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "string",
                        "enum": [
                          "openai",
                          "gemini",
                          "anthropic",
                          "bedrock",
                          "cohere",
                          "cerebras",
                          "mistral",
                          "perplexity",
                          "groq",
                          "xai",
                          "openrouter",
                          "vllm",
                          "ollama",
                          "ollama-native",
                          "zhipuai",
                          "deepseek",
                          "minimax",
                          "kimi",
                          "azure",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "archestra"
                        ]
                      },
                      "secretId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ]
                      },
                      "userId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "teamId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "baseUrl": {
                        "nullable": true,
                        "type": "string"
                      },
                      "inferenceBaseUrl": {
                        "nullable": true,
                        "type": "string"
                      },
                      "extraHeaders": {
                        "nullable": true,
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "isSystem": {
                        "type": "boolean"
                      },
                      "isPrimary": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "teamName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "userName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "vaultSecretPath": {
                        "nullable": true,
                        "type": "string"
                      },
                      "vaultSecretKey": {
                        "nullable": true,
                        "type": "string"
                      },
                      "secretStorageType": {
                        "type": "string",
                        "enum": [
                          "vault",
                          "external_vault",
                          "database",
                          "none"
                        ]
                      },
                      "bestModelId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "isAgentKey": {
                        "type": "boolean"
                      },
                      "subscriptionKind": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "chatgpt",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "x-premium"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "name",
                      "provider",
                      "secretId",
                      "scope",
                      "userId",
                      "teamId",
                      "baseUrl",
                      "inferenceBaseUrl",
                      "extraHeaders",
                      "isSystem",
                      "isPrimary",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmProviderApiKey:read"
          ]
        }
      },
      "post": {
        "operationId": "createLlmProviderApiKey",
        "tags": [
          "LLM Provider API Keys"
        ],
        "description": "Create a new LLM provider API key with specified visibility\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "gemini",
                      "anthropic",
                      "bedrock",
                      "cohere",
                      "cerebras",
                      "mistral",
                      "perplexity",
                      "groq",
                      "xai",
                      "openrouter",
                      "vllm",
                      "ollama",
                      "ollama-native",
                      "zhipuai",
                      "deepseek",
                      "minimax",
                      "kimi",
                      "azure",
                      "github-copilot",
                      "microsoft-365-copilot",
                      "archestra"
                    ]
                  },
                  "apiKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "baseUrl": {
                    "nullable": true,
                    "type": "string",
                    "format": "uri"
                  },
                  "inferenceBaseUrl": {
                    "nullable": true,
                    "type": "string",
                    "format": "uri"
                  },
                  "extraHeaders": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "scope": {
                    "default": "personal",
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teamId": {
                    "type": "string"
                  },
                  "isPrimary": {
                    "type": "boolean"
                  },
                  "vaultSecretPath": {
                    "type": "string",
                    "minLength": 1
                  },
                  "vaultSecretKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "awsAccessKeyId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "awsSecretAccessKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "awsSessionToken": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "name",
                  "provider"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "userId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "baseUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "inferenceBaseUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "extraHeaders": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "isSystem": {
                      "type": "boolean"
                    },
                    "isPrimary": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "provider",
                    "secretId",
                    "scope",
                    "userId",
                    "teamId",
                    "baseUrl",
                    "inferenceBaseUrl",
                    "extraHeaders",
                    "isSystem",
                    "isPrimary",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/llm-provider-api-keys/available": {
      "get": {
        "operationId": "getAvailableLlmProviderApiKeys",
        "tags": [
          "LLM Provider API Keys"
        ],
        "description": "Get LLM provider API keys available for the current user to use\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmProviderApiKey:read`: View LLM provider API keys",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "openai",
                "gemini",
                "anthropic",
                "bedrock",
                "cohere",
                "cerebras",
                "mistral",
                "perplexity",
                "groq",
                "xai",
                "openrouter",
                "vllm",
                "ollama",
                "ollama-native",
                "zhipuai",
                "deepseek",
                "minimax",
                "kimi",
                "azure",
                "github-copilot",
                "microsoft-365-copilot",
                "archestra"
              ]
            },
            "in": "query",
            "name": "provider",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "includeKeyId",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "string",
                        "enum": [
                          "openai",
                          "gemini",
                          "anthropic",
                          "bedrock",
                          "cohere",
                          "cerebras",
                          "mistral",
                          "perplexity",
                          "groq",
                          "xai",
                          "openrouter",
                          "vllm",
                          "ollama",
                          "ollama-native",
                          "zhipuai",
                          "deepseek",
                          "minimax",
                          "kimi",
                          "azure",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "archestra"
                        ]
                      },
                      "secretId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ]
                      },
                      "userId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "teamId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "baseUrl": {
                        "nullable": true,
                        "type": "string"
                      },
                      "inferenceBaseUrl": {
                        "nullable": true,
                        "type": "string"
                      },
                      "extraHeaders": {
                        "nullable": true,
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "isSystem": {
                        "type": "boolean"
                      },
                      "isPrimary": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "teamName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "userName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "vaultSecretPath": {
                        "nullable": true,
                        "type": "string"
                      },
                      "vaultSecretKey": {
                        "nullable": true,
                        "type": "string"
                      },
                      "secretStorageType": {
                        "type": "string",
                        "enum": [
                          "vault",
                          "external_vault",
                          "database",
                          "none"
                        ]
                      },
                      "bestModelId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "isAgentKey": {
                        "type": "boolean"
                      },
                      "subscriptionKind": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "chatgpt",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "x-premium"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "name",
                      "provider",
                      "secretId",
                      "scope",
                      "userId",
                      "teamId",
                      "baseUrl",
                      "inferenceBaseUrl",
                      "extraHeaders",
                      "isSystem",
                      "isPrimary",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmProviderApiKey:read"
          ]
        }
      }
    },
    "/api/llm-provider-api-keys/{id}": {
      "get": {
        "operationId": "getLlmProviderApiKey",
        "tags": [
          "LLM Provider API Keys"
        ],
        "description": "Get a specific LLM provider API key\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmProviderApiKey:read`: View LLM provider API keys",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "userId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "baseUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "inferenceBaseUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "extraHeaders": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "isSystem": {
                      "type": "boolean"
                    },
                    "isPrimary": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "teamName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "userName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "vaultSecretPath": {
                      "nullable": true,
                      "type": "string"
                    },
                    "vaultSecretKey": {
                      "nullable": true,
                      "type": "string"
                    },
                    "secretStorageType": {
                      "type": "string",
                      "enum": [
                        "vault",
                        "external_vault",
                        "database",
                        "none"
                      ]
                    },
                    "bestModelId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "isAgentKey": {
                      "type": "boolean"
                    },
                    "subscriptionKind": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "chatgpt",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "x-premium"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "provider",
                    "secretId",
                    "scope",
                    "userId",
                    "teamId",
                    "baseUrl",
                    "inferenceBaseUrl",
                    "extraHeaders",
                    "isSystem",
                    "isPrimary",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmProviderApiKey:read"
          ]
        }
      },
      "patch": {
        "operationId": "updateLlmProviderApiKey",
        "tags": [
          "LLM Provider API Keys"
        ],
        "description": "Update an LLM provider API key (name, API key value, visibility, or team)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmProviderApiKey:update`: Modify LLM provider API key configuration and visibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "apiKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "baseUrl": {
                    "nullable": true,
                    "type": "string",
                    "format": "uri"
                  },
                  "inferenceBaseUrl": {
                    "nullable": true,
                    "type": "string",
                    "format": "uri"
                  },
                  "extraHeaders": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teamId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "isPrimary": {
                    "type": "boolean"
                  },
                  "vaultSecretPath": {
                    "type": "string",
                    "minLength": 1
                  },
                  "vaultSecretKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "awsAccessKeyId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "awsSecretAccessKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "awsSessionToken": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "userId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "baseUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "inferenceBaseUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "extraHeaders": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "isSystem": {
                      "type": "boolean"
                    },
                    "isPrimary": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "provider",
                    "secretId",
                    "scope",
                    "userId",
                    "teamId",
                    "baseUrl",
                    "inferenceBaseUrl",
                    "extraHeaders",
                    "isSystem",
                    "isPrimary",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmProviderApiKey:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteLlmProviderApiKey",
        "tags": [
          "LLM Provider API Keys"
        ],
        "description": "Delete an LLM provider API key\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmProviderApiKey:delete`: Remove LLM provider API keys",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmProviderApiKey:delete"
          ]
        }
      }
    },
    "/api/llm-provider-api-keys/{id}/reconnect": {
      "post": {
        "operationId": "reconnectLlmProviderApiKey",
        "tags": [
          "LLM Provider API Keys"
        ],
        "description": "Re-authenticate the caller's own personal subscription key in place, rotating its stored credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "apiKey"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "userId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "baseUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "inferenceBaseUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "extraHeaders": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "isSystem": {
                      "type": "boolean"
                    },
                    "isPrimary": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "provider",
                    "secretId",
                    "scope",
                    "userId",
                    "teamId",
                    "baseUrl",
                    "inferenceBaseUrl",
                    "extraHeaders",
                    "isSystem",
                    "isPrimary",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/mcp/app/{appId}": {
      "post": {
        "operationId": "mcpAppProxyPost",
        "tags": [
          "mcp-proxy"
        ],
        "description": "Proxy an MCP App's runtime requests with session auth\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "appId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/v1/mcp/{profileId}": {
      "get": {
        "operationId": "mcpGatewayGet",
        "tags": [
          "MCP Gateway"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "path",
            "name": "profileId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string"
                    },
                    "transport": {
                      "type": "string"
                    },
                    "protocolVersions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "capabilities": {
                      "type": "object",
                      "properties": {
                        "tools": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "tools"
                      ],
                      "additionalProperties": false
                    },
                    "tokenAuth": {
                      "type": "object",
                      "properties": {
                        "tokenId": {
                          "type": "string"
                        },
                        "teamId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "isOrganizationToken": {
                          "type": "boolean"
                        },
                        "isUserToken": {
                          "type": "boolean"
                        },
                        "userId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "tokenId",
                        "teamId",
                        "isOrganizationToken"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "name",
                    "version",
                    "agentId",
                    "transport",
                    "protocolVersions",
                    "capabilities"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "mcpGatewayPost",
        "tags": [
          "MCP Gateway"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "path",
            "name": "profileId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/mcp-oauth-clients": {
      "get": {
        "operationId": "getMcpOauthClients",
        "tags": [
          "MCP OAuth Clients"
        ],
        "description": "List MCP OAuth clients that can access MCP gateways\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpOauthClient:read`: View MCP OAuth client registrations",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "search",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "clientId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "grantType": {
                        "type": "string",
                        "enum": [
                          "client_credentials",
                          "authorization_code"
                        ]
                      },
                      "allowedGatewayIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "redirectUris": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "disabled": {
                        "type": "boolean"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ]
                      },
                      "authorId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "authorName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "teams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "clientId",
                      "name",
                      "organizationId",
                      "grantType",
                      "allowedGatewayIds",
                      "redirectUris",
                      "disabled",
                      "scope",
                      "authorId",
                      "authorName",
                      "teams",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpOauthClient:read"
          ]
        }
      },
      "post": {
        "operationId": "createMcpOauthClient",
        "tags": [
          "MCP OAuth Clients"
        ],
        "description": "Create an MCP OAuth client and return its client secret once\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpOauthClient:create`: Create MCP OAuth client registrations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "grantType": {
                    "default": "client_credentials",
                    "type": "string",
                    "enum": [
                      "client_credentials",
                      "authorization_code"
                    ]
                  },
                  "allowedGatewayIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "redirectUris": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "grantType": {
                      "type": "string",
                      "enum": [
                        "client_credentials",
                        "authorization_code"
                      ]
                    },
                    "allowedGatewayIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "redirectUris": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "clientSecret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "clientId",
                    "name",
                    "organizationId",
                    "grantType",
                    "allowedGatewayIds",
                    "redirectUris",
                    "disabled",
                    "scope",
                    "authorId",
                    "authorName",
                    "teams",
                    "createdAt",
                    "updatedAt",
                    "clientSecret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpOauthClient:create"
          ]
        }
      }
    },
    "/api/mcp-oauth-clients/{id}": {
      "put": {
        "operationId": "updateMcpOauthClient",
        "tags": [
          "MCP OAuth Clients"
        ],
        "description": "Update an MCP OAuth client\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpOauthClient:update`: Modify MCP OAuth client registrations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "grantType": {
                    "default": "client_credentials",
                    "type": "string",
                    "enum": [
                      "client_credentials",
                      "authorization_code"
                    ]
                  },
                  "allowedGatewayIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "redirectUris": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teams": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "grantType": {
                      "type": "string",
                      "enum": [
                        "client_credentials",
                        "authorization_code"
                      ]
                    },
                    "allowedGatewayIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "redirectUris": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "clientId",
                    "name",
                    "organizationId",
                    "grantType",
                    "allowedGatewayIds",
                    "redirectUris",
                    "disabled",
                    "scope",
                    "authorId",
                    "authorName",
                    "teams",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpOauthClient:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteMcpOauthClient",
        "tags": [
          "MCP OAuth Clients"
        ],
        "description": "Delete an MCP OAuth client\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpOauthClient:delete`: Delete MCP OAuth client registrations",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpOauthClient:delete"
          ]
        }
      }
    },
    "/api/mcp-oauth-clients/{id}/rotate-secret": {
      "post": {
        "operationId": "rotateMcpOauthClientSecret",
        "tags": [
          "MCP OAuth Clients"
        ],
        "description": "Rotate an MCP OAuth client's client secret\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpOauthClient:update`: Modify MCP OAuth client registrations",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "clientId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "grantType": {
                      "type": "string",
                      "enum": [
                        "client_credentials",
                        "authorization_code"
                      ]
                    },
                    "allowedGatewayIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "redirectUris": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "clientSecret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "clientId",
                    "name",
                    "organizationId",
                    "grantType",
                    "allowedGatewayIds",
                    "redirectUris",
                    "disabled",
                    "scope",
                    "authorId",
                    "authorName",
                    "teams",
                    "createdAt",
                    "updatedAt",
                    "clientSecret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpOauthClient:update"
          ]
        }
      }
    },
    "/api/mcp/{agentId}": {
      "post": {
        "operationId": "mcpProxyPost",
        "tags": [
          "mcp-proxy"
        ],
        "description": "Proxy MCP Gateway requests with session auth\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/mcp/server/{mcpServerId}": {
      "post": {
        "operationId": "mcpServerProxyPost",
        "tags": [
          "mcp-proxy"
        ],
        "description": "Proxy a server-scoped MCP App's runtime requests with session auth\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "mcpServerId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/mcp_server": {
      "get": {
        "operationId": "getMcpServers",
        "tags": [
          "MCP Server"
        ],
        "description": "Get all installed MCP servers\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:read`: View installed MCP servers and their status",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "catalogId",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "personal",
                "team",
                "org"
              ]
            },
            "in": "query",
            "name": "assignmentScope",
            "required": false
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "assignmentTeamIds",
            "required": false
          },
          {
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by lifecycle status. `deleted` lists soft-deleted (uninstalled) installs and requires the manage-deleted permission (granted to admins by default)."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "deploymentName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "catalogId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "serverType": {
                        "type": "string",
                        "enum": [
                          "local",
                          "remote",
                          "builtin",
                          "app"
                        ]
                      },
                      "secretId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "environmentValues": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "ownerId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "teamId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "scope": {
                        "type": "string",
                        "enum": [
                          "personal",
                          "team",
                          "org"
                        ]
                      },
                      "reinstallRequired": {
                        "type": "boolean"
                      },
                      "reinstallReason": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "new-input",
                          "restart"
                        ]
                      },
                      "localInstallationStatus": {
                        "type": "string",
                        "enum": [
                          "idle",
                          "pending",
                          "discovering-tools",
                          "success",
                          "error"
                        ]
                      },
                      "localInstallationError": {
                        "nullable": true,
                        "type": "string"
                      },
                      "oauthRefreshError": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "refresh_failed",
                          "no_refresh_token"
                        ]
                      },
                      "oauthRefreshErrorMessage": {
                        "nullable": true,
                        "type": "string"
                      },
                      "oauthRefreshErrorDescription": {
                        "nullable": true,
                        "type": "string"
                      },
                      "oauthRefreshFailedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "ownerEmail": {
                        "nullable": true,
                        "type": "string"
                      },
                      "catalogName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "users": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "userDetails": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "userId": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "userId",
                            "email",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "teamDetails": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "teamId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "teamId",
                          "name",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      },
                      "assignedAgents": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "agentType": {
                              "type": "string",
                              "enum": [
                                "profile",
                                "mcp_gateway",
                                "llm_proxy",
                                "agent"
                              ]
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "personal",
                                "team",
                                "org"
                              ]
                            },
                            "ownerEmail": {
                              "nullable": true,
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "agentType",
                            "scope",
                            "ownerEmail"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "autoModeAgents": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "agentType": {
                              "type": "string",
                              "enum": [
                                "profile",
                                "mcp_gateway",
                                "llm_proxy",
                                "agent"
                              ]
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "personal",
                                "team",
                                "org"
                              ]
                            },
                            "ownerEmail": {
                              "nullable": true,
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "agentType",
                            "scope",
                            "ownerEmail"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "secretStorageType": {
                        "type": "string",
                        "enum": [
                          "vault",
                          "external_vault",
                          "database",
                          "none"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "deploymentName",
                      "catalogId",
                      "serverType",
                      "secretId",
                      "environmentValues",
                      "ownerId",
                      "teamId",
                      "scope",
                      "reinstallRequired",
                      "reinstallReason",
                      "localInstallationStatus",
                      "localInstallationError",
                      "oauthRefreshError",
                      "oauthRefreshErrorMessage",
                      "oauthRefreshErrorDescription",
                      "oauthRefreshFailedAt",
                      "createdAt",
                      "updatedAt",
                      "deletedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:read"
          ]
        }
      },
      "post": {
        "operationId": "installMcpServer",
        "tags": [
          "MCP Server"
        ],
        "description": "Install an MCP server (from catalog or custom)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:create`: Install MCP servers from the registry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "catalogId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "secretId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "environmentValues": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "ownerId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "teamId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "scope": {
                    "default": "personal",
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "reinstallRequired": {
                    "type": "boolean"
                  },
                  "localInstallationStatus": {
                    "type": "string",
                    "enum": [
                      "idle",
                      "pending",
                      "discovering-tools",
                      "success",
                      "error"
                    ]
                  },
                  "localInstallationError": {
                    "nullable": true,
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "userConfigValues": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "agentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "accessToken": {
                    "type": "string"
                  },
                  "isByosVault": {
                    "type": "boolean"
                  },
                  "serviceAccount": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "catalogId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentValues": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "ownerId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "reinstallRequired": {
                      "type": "boolean"
                    },
                    "reinstallReason": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "new-input",
                        "restart"
                      ]
                    },
                    "localInstallationStatus": {
                      "type": "string",
                      "enum": [
                        "idle",
                        "pending",
                        "discovering-tools",
                        "success",
                        "error"
                      ]
                    },
                    "localInstallationError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshError": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "refresh_failed",
                        "no_refresh_token"
                      ]
                    },
                    "oauthRefreshErrorMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshErrorDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshFailedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "ownerEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userDetails": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "userId",
                          "email",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teamDetails": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "teamId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "teamId",
                        "name",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    "assignedAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "autoModeAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "secretStorageType": {
                      "type": "string",
                      "enum": [
                        "vault",
                        "external_vault",
                        "database",
                        "none"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "deploymentName",
                    "catalogId",
                    "serverType",
                    "secretId",
                    "environmentValues",
                    "ownerId",
                    "teamId",
                    "scope",
                    "reinstallRequired",
                    "reinstallReason",
                    "localInstallationStatus",
                    "localInstallationError",
                    "oauthRefreshError",
                    "oauthRefreshErrorMessage",
                    "oauthRefreshErrorDescription",
                    "oauthRefreshFailedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:create"
          ]
        }
      }
    },
    "/api/mcp_server/{id}": {
      "get": {
        "operationId": "getMcpServer",
        "tags": [
          "MCP Server"
        ],
        "description": "Get MCP server by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:read`: View installed MCP servers and their status",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentValues": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "ownerId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "reinstallRequired": {
                      "type": "boolean"
                    },
                    "reinstallReason": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "new-input",
                        "restart"
                      ]
                    },
                    "localInstallationStatus": {
                      "type": "string",
                      "enum": [
                        "idle",
                        "pending",
                        "discovering-tools",
                        "success",
                        "error"
                      ]
                    },
                    "localInstallationError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshError": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "refresh_failed",
                        "no_refresh_token"
                      ]
                    },
                    "oauthRefreshErrorMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshErrorDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshFailedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "ownerEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userDetails": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "userId",
                          "email",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teamDetails": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "teamId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "teamId",
                        "name",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    "assignedAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "autoModeAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "secretStorageType": {
                      "type": "string",
                      "enum": [
                        "vault",
                        "external_vault",
                        "database",
                        "none"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "deploymentName",
                    "catalogId",
                    "serverType",
                    "secretId",
                    "environmentValues",
                    "ownerId",
                    "teamId",
                    "scope",
                    "reinstallRequired",
                    "reinstallReason",
                    "localInstallationStatus",
                    "localInstallationError",
                    "oauthRefreshError",
                    "oauthRefreshErrorMessage",
                    "oauthRefreshErrorDescription",
                    "oauthRefreshFailedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:read"
          ]
        }
      },
      "delete": {
        "operationId": "deleteMcpServer",
        "tags": [
          "MCP Server"
        ],
        "description": "Delete/uninstall an MCP server\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:delete`: Uninstall MCP servers",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:delete"
          ]
        }
      }
    },
    "/api/mcp_server/{id}/reauthenticate": {
      "patch": {
        "operationId": "reauthenticateMcpServer",
        "tags": [
          "MCP Server"
        ],
        "description": "Update MCP server secret after re-authentication (clears OAuth refresh errors)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:create`: Install MCP servers from the registry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "secretId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "accessToken": {
                    "type": "string"
                  },
                  "userConfigValues": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "environmentValues": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "isByosVault": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentValues": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "ownerId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "reinstallRequired": {
                      "type": "boolean"
                    },
                    "reinstallReason": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "new-input",
                        "restart"
                      ]
                    },
                    "localInstallationStatus": {
                      "type": "string",
                      "enum": [
                        "idle",
                        "pending",
                        "discovering-tools",
                        "success",
                        "error"
                      ]
                    },
                    "localInstallationError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshError": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "refresh_failed",
                        "no_refresh_token"
                      ]
                    },
                    "oauthRefreshErrorMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshErrorDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshFailedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "ownerEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userDetails": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "userId",
                          "email",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teamDetails": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "teamId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "teamId",
                        "name",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    "assignedAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "autoModeAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "secretStorageType": {
                      "type": "string",
                      "enum": [
                        "vault",
                        "external_vault",
                        "database",
                        "none"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "deploymentName",
                    "catalogId",
                    "serverType",
                    "secretId",
                    "environmentValues",
                    "ownerId",
                    "teamId",
                    "scope",
                    "reinstallRequired",
                    "reinstallReason",
                    "localInstallationStatus",
                    "localInstallationError",
                    "oauthRefreshError",
                    "oauthRefreshErrorMessage",
                    "oauthRefreshErrorDescription",
                    "oauthRefreshFailedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:create"
          ]
        }
      }
    },
    "/api/mcp_server/{id}/restore": {
      "post": {
        "operationId": "restoreMcpServer",
        "tags": [
          "MCP Server"
        ],
        "description": "Restore a soft-deleted (uninstalled) MCP server. Flag-only: the server is marked for manual reinstall, not re-provisioned.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:manage-deleted`: View and restore soft-deleted (uninstalled) MCP servers",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentValues": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "ownerId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "reinstallRequired": {
                      "type": "boolean"
                    },
                    "reinstallReason": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "new-input",
                        "restart"
                      ]
                    },
                    "localInstallationStatus": {
                      "type": "string",
                      "enum": [
                        "idle",
                        "pending",
                        "discovering-tools",
                        "success",
                        "error"
                      ]
                    },
                    "localInstallationError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshError": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "refresh_failed",
                        "no_refresh_token"
                      ]
                    },
                    "oauthRefreshErrorMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshErrorDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshFailedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "ownerEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userDetails": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "userId",
                          "email",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teamDetails": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "teamId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "teamId",
                        "name",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    "assignedAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "autoModeAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "secretStorageType": {
                      "type": "string",
                      "enum": [
                        "vault",
                        "external_vault",
                        "database",
                        "none"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "deploymentName",
                    "catalogId",
                    "serverType",
                    "secretId",
                    "environmentValues",
                    "ownerId",
                    "teamId",
                    "scope",
                    "reinstallRequired",
                    "reinstallReason",
                    "localInstallationStatus",
                    "localInstallationError",
                    "oauthRefreshError",
                    "oauthRefreshErrorMessage",
                    "oauthRefreshErrorDescription",
                    "oauthRefreshFailedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:manage-deleted"
          ]
        }
      }
    },
    "/api/mcp_server/{id}/installation-status": {
      "get": {
        "operationId": "getMcpServerInstallationStatus",
        "tags": [
          "MCP Server"
        ],
        "description": "Get the installation status of an MCP server (for polling during local server installation)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:read`: View installed MCP servers and their status",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "localInstallationStatus": {
                      "type": "string",
                      "enum": [
                        "idle",
                        "pending",
                        "discovering-tools",
                        "success",
                        "error"
                      ]
                    },
                    "localInstallationError": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "localInstallationStatus",
                    "localInstallationError"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:read"
          ]
        }
      }
    },
    "/api/mcp_server/{id}/tools": {
      "get": {
        "operationId": "getMcpServerTools",
        "tags": [
          "MCP Server"
        ],
        "description": "Get all tools for an MCP server\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:read`: View installed MCP servers and their status",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "group": {
                        "nullable": true,
                        "type": "string"
                      },
                      "assignedAgentCount": {
                        "type": "number"
                      },
                      "assignedAgents": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "description",
                      "parameters",
                      "createdAt",
                      "group",
                      "assignedAgentCount",
                      "assignedAgents"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:read"
          ]
        }
      }
    },
    "/api/mcp_server/{id}/inspect": {
      "post": {
        "operationId": "inspectMcpServer",
        "tags": [
          "MCP Server"
        ],
        "description": "Inspect a running MCP server (list tools or call a tool)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:read`: View installed MCP servers and their status",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "method": {
                    "type": "string",
                    "enum": [
                      "tools/list",
                      "tools/call"
                    ]
                  },
                  "toolName": {
                    "type": "string"
                  },
                  "toolArguments": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "method"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:read"
          ]
        }
      }
    },
    "/api/mcp_server/{id}/reinstall": {
      "post": {
        "operationId": "reinstallMcpServer",
        "tags": [
          "MCP Server"
        ],
        "description": "Reinstall an MCP server without losing tool assignments and policies\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:create`: Install MCP servers from the registry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "environmentValues": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "userConfigValues": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "isByosVault": {
                    "type": "boolean"
                  },
                  "serviceAccount": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "deploymentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "serverType": {
                      "type": "string",
                      "enum": [
                        "local",
                        "remote",
                        "builtin",
                        "app"
                      ]
                    },
                    "secretId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "environmentValues": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "ownerId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "teamId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "reinstallRequired": {
                      "type": "boolean"
                    },
                    "reinstallReason": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "new-input",
                        "restart"
                      ]
                    },
                    "localInstallationStatus": {
                      "type": "string",
                      "enum": [
                        "idle",
                        "pending",
                        "discovering-tools",
                        "success",
                        "error"
                      ]
                    },
                    "localInstallationError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshError": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "refresh_failed",
                        "no_refresh_token"
                      ]
                    },
                    "oauthRefreshErrorMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshErrorDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "oauthRefreshFailedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "ownerEmail": {
                      "nullable": true,
                      "type": "string"
                    },
                    "catalogName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userDetails": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "userId",
                          "email",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teamDetails": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "teamId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "teamId",
                        "name",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    "assignedAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "autoModeAgents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentType": {
                            "type": "string",
                            "enum": [
                              "profile",
                              "mcp_gateway",
                              "llm_proxy",
                              "agent"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "ownerEmail": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "agentType",
                          "scope",
                          "ownerEmail"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "secretStorageType": {
                      "type": "string",
                      "enum": [
                        "vault",
                        "external_vault",
                        "database",
                        "none"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "deploymentName",
                    "catalogId",
                    "serverType",
                    "secretId",
                    "environmentValues",
                    "ownerId",
                    "teamId",
                    "scope",
                    "reinstallRequired",
                    "reinstallReason",
                    "localInstallationStatus",
                    "localInstallationError",
                    "oauthRefreshError",
                    "oauthRefreshErrorMessage",
                    "oauthRefreshErrorDescription",
                    "oauthRefreshFailedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:create"
          ]
        }
      }
    },
    "/api/mcp_server/{id}/reload-tools": {
      "post": {
        "operationId": "reloadMcpServerTools",
        "tags": [
          "MCP Server"
        ],
        "description": "Re-discover an MCP server's tools from the live server and refresh the stored tool catalog without reinstalling\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:create`: Install MCP servers from the registry",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "created": {
                      "type": "number"
                    },
                    "updated": {
                      "type": "number"
                    },
                    "unchanged": {
                      "type": "number"
                    },
                    "deleted": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "created",
                    "updated",
                    "unchanged",
                    "deleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:create"
          ]
        }
      }
    },
    "/api/mcp-tool-calls": {
      "get": {
        "operationId": "getMcpToolCalls",
        "tags": [
          "MCP Tool Call"
        ],
        "description": "Get all MCP tool calls with pagination and sorting\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`log:read`: View your own LLM proxy and MCP tool call logs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "agentId",
            "required": false,
            "description": "Filter by agent ID"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "in": "query",
            "name": "startDate",
            "required": false,
            "description": "Filter by start date (ISO 8601 format)"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "in": "query",
            "name": "endDate",
            "required": false,
            "description": "Filter by end date (ISO 8601 format)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Free-text search across MCP server name, tool name, and arguments (case-insensitive)"
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "agentId",
                "mcpServerName",
                "method"
              ]
            },
            "in": "query",
            "name": "sortBy",
            "required": false
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "ownerType": {
                            "type": "string",
                            "maxLength": 16
                          },
                          "agentId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "appId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "mcpServerName": {
                            "type": "string",
                            "maxLength": 255
                          },
                          "method": {
                            "type": "string",
                            "maxLength": 255
                          },
                          "toolCall": {
                            "nullable": true,
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "arguments": {
                                    "type": "object",
                                    "additionalProperties": {}
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "arguments"
                                ],
                                "additionalProperties": false,
                                "description": "Represents a tool call in a provider-agnostic way"
                              },
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "__incognitoLocked": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "__incognitoLocked"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "__redacted": {
                                        "type": "string",
                                        "enum": [
                                          "incognito"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "__redacted"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            ]
                          },
                          "toolResult": {
                            "nullable": true
                          },
                          "userId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "authMethod": {
                            "nullable": true,
                            "type": "string",
                            "enum": [
                              "oauth",
                              "user_token",
                              "org_token",
                              "team_token",
                              "external_idp",
                              "session"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "userName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "appName": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "ownerType",
                          "agentId",
                          "appId",
                          "mcpServerName",
                          "method",
                          "toolCall",
                          "toolResult",
                          "userId",
                          "authMethod",
                          "createdAt",
                          "userName",
                          "appName"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "log:read"
          ]
        }
      }
    },
    "/api/mcp-tool-calls/{mcpToolCallId}": {
      "get": {
        "operationId": "getMcpToolCall",
        "tags": [
          "MCP Tool Call"
        ],
        "description": "Get MCP tool call by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`log:read`: View your own LLM proxy and MCP tool call logs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "mcpToolCallId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "ownerType": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "appId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "mcpServerName": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "method": {
                      "type": "string",
                      "maxLength": 255
                    },
                    "toolCall": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "arguments": {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "arguments"
                          ],
                          "additionalProperties": false,
                          "description": "Represents a tool call in a provider-agnostic way"
                        },
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "__incognitoLocked": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "__incognitoLocked"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "__redacted": {
                                  "type": "string",
                                  "enum": [
                                    "incognito"
                                  ]
                                }
                              },
                              "required": [
                                "__redacted"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      ]
                    },
                    "toolResult": {
                      "nullable": true
                    },
                    "userId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "authMethod": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "oauth",
                        "user_token",
                        "org_token",
                        "team_token",
                        "external_idp",
                        "session"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "userName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ownerType",
                    "agentId",
                    "appId",
                    "mcpServerName",
                    "method",
                    "toolCall",
                    "toolResult",
                    "userId",
                    "authMethod",
                    "createdAt",
                    "userName",
                    "appName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "log:read"
          ]
        }
      }
    },
    "/api/members": {
      "get": {
        "operationId": "getMembers",
        "tags": [
          "Member"
        ],
        "description": "Get all members of the organization with pagination and optional filters\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`member:read`: View organization members and their roles",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "name",
            "required": false,
            "description": "Search by user name or email. Case-insensitive: every whitespace-separated word must appear in the name or the email, in any order, so \"Ada Lovelace\" also matches \"Lovelace, Ada M.\""
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "role",
            "required": false,
            "description": "Filter by exact role name"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "image": {
                            "nullable": true,
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "twoFactorEnabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "userId",
                          "name",
                          "email",
                          "image",
                          "role",
                          "createdAt",
                          "twoFactorEnabled"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "member:read"
          ]
        }
      }
    },
    "/api/mfiles-vaf-add-on/script": {
      "get": {
        "operationId": "getMfilesVafAddOnScript",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Serve the M-Files connector's VAF Add On install bootstrap: a tiny PowerShell script that fetches the static installer and runs it with the server-resolved package source. Identical for every caller — it carries no credentials or per-user state.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/mfiles-vaf-add-on/distribution": {
      "get": {
        "operationId": "getMfilesVafAddOnDistribution",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Resolve how the M-Files connector's VAF Add On is distributed to this installation: a verified direct package download URL (release asset or the dev source-ref CI build proxied by the backend), or null when the install script compiles from source instead. The connector form probes this for its download link.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "packageDownloadUrl": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "packageDownloadUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/mfiles-vaf-add-on/package": {
      "get": {
        "operationId": "getMfilesVafAddOnPackage",
        "tags": [
          "Knowledge Bases"
        ],
        "description": "Serve the M-Files connector's VAF Add On package built by CI for the configured development source ref (ARCHESTRA_KNOWLEDGE_BASE_MFILES_VAF_ADD_ON_SOURCE_REF). 404 when the override is unset or no CI build exists for it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/microsoft-365-copilot-auth/device/start": {
      "post": {
        "operationId": "microsoft365CopilotDeviceAuthStart",
        "tags": [
          "Microsoft 365 Copilot Auth"
        ],
        "description": "Start the Entra ID device flow used to connect a Microsoft 365 Copilot account\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deviceCode": {
                      "type": "string"
                    },
                    "userCode": {
                      "type": "string"
                    },
                    "verificationUri": {
                      "type": "string"
                    },
                    "interval": {
                      "type": "number"
                    },
                    "expiresIn": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "deviceCode",
                    "userCode",
                    "verificationUri",
                    "interval",
                    "expiresIn"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/microsoft-365-copilot-auth/device/poll": {
      "post": {
        "operationId": "microsoft365CopilotDeviceAuthPoll",
        "tags": [
          "Microsoft 365 Copilot Auth"
        ],
        "description": "Poll the Entra ID device flow once; returns the refresh token when the user has authorized\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deviceCode": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "deviceCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "slow_down"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "complete"
                          ]
                        },
                        "refreshToken": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "refreshToken"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/v1/microsoft-365-copilot/chat/completions": {
      "post": {
        "operationId": "microsoft365CopilotChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Microsoft 365 Copilot (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "developer"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "system"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "input_audio"
                                            ]
                                          },
                                          "input_audio": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              },
                                              "format": {
                                                "type": "string",
                                                "enum": [
                                                  "wav",
                                                  "mp3"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "data",
                                              "format"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "input_audio"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "file"
                                            ]
                                          },
                                          "file": {
                                            "type": "object",
                                            "properties": {
                                              "file_data": {
                                                "type": "string"
                                              },
                                              "file_id": {
                                                "type": "string"
                                              },
                                              "filename": {
                                                "type": "string"
                                              }
                                            },
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "file"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "audio": {
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "refusal"
                                        ]
                                      },
                                      "refusal": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "refusal"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                  }
                                }
                              ]
                            },
                            "function_call": {
                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "arguments": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "arguments",
                                "name"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "reasoning_content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "refusal": {
                              "nullable": true,
                              "type": "string"
                            },
                            "tool_calls": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "arguments",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "custom"
                                        ]
                                      },
                                      "custom": {
                                        "type": "object",
                                        "properties": {
                                          "input": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "input",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "custom"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                  }
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                              }
                            }
                          },
                          "required": [
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "tool"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      }
                                    ]
                                  }
                                }
                              ]
                            },
                            "tool_call_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "tool_call_id"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "name"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                        }
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "function": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "strict": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                            }
                          },
                          "required": [
                            "type",
                            "function"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "custom": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name of the custom tool, used to identify it in tool calls"
                                },
                                "description": {
                                  "description": "Optional description of the custom tool, used to provide more context",
                                  "type": "string"
                                },
                                "format": {
                                  "description": "The input format for the custom tool. Default is unconstrained text.",
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text"
                                          ],
                                          "description": "Unconstrained text format. Always `text`"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "description": "Unconstrained free-form text"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "grammar"
                                          ]
                                        },
                                        "grammar": {
                                          "type": "object",
                                          "properties": {
                                            "definition": {
                                              "type": "string",
                                              "description": "The grammar definition"
                                            },
                                            "syntax": {
                                              "type": "string",
                                              "enum": [
                                                "lark",
                                                "regex"
                                              ],
                                              "description": "The syntax of the grammar definition"
                                            }
                                          },
                                          "required": [
                                            "definition",
                                            "syntax"
                                          ],
                                          "description": "Your chosen grammar"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "grammar"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "custom"
                          ],
                          "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                        }
                      ],
                      "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                    }
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "none",
                          "auto",
                          "required"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "allowed_tools"
                            ]
                          },
                          "allowed_tools": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "required"
                                ],
                                "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                              },
                              "tools": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                  }
                                },
                                "description": "A list of tool definitions that the model should be allowed to call"
                              }
                            },
                            "required": [
                              "mode",
                              "tools"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                          }
                        },
                        "required": [
                          "type",
                          "allowed_tools"
                        ],
                        "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "function"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "custom"
                            ]
                          },
                          "custom": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the custom tool, used to identify it in tool calls"
                              },
                              "description": {
                                "description": "Optional description of the custom tool, used to provide more context",
                                "type": "string"
                              },
                              "format": {
                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ],
                                        "description": "Unconstrained text format. Always `text`"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "description": "Unconstrained free-form text"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "grammar"
                                        ]
                                      },
                                      "grammar": {
                                        "type": "object",
                                        "properties": {
                                          "definition": {
                                            "type": "string",
                                            "description": "The grammar definition"
                                          },
                                          "syntax": {
                                            "type": "string",
                                            "enum": [
                                              "lark",
                                              "regex"
                                            ],
                                            "description": "The syntax of the grammar definition"
                                          }
                                        },
                                        "required": [
                                          "definition",
                                          "syntax"
                                        ],
                                        "description": "Your chosen grammar"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "grammar"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "custom"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                      }
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_completion_tokens": {
                    "nullable": true,
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "reasoning_effort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "none",
                      "minimal",
                      "low",
                      "medium",
                      "high",
                      "xhigh"
                    ]
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "finish_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "length",
                                  "tool_calls",
                                  "content_filter",
                                  "function_call"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "index": {
                            "type": "number"
                          },
                          "logprobs": {
                            "nullable": true
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "refusal": {
                                "nullable": true,
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "annotations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              },
                              "audio": {
                                "nullable": true
                              },
                              "function_call": {
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "reasoning_content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "tool_calls": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "input": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "input",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                }
                              }
                            },
                            "required": [
                              "role"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                          }
                        },
                        "required": [
                          "finish_reason",
                          "logprobs",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                      }
                    },
                    "created": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "chat.completion"
                      ]
                    },
                    "server_tier": {
                      "type": "string"
                    },
                    "system_fingerprint": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "completion_tokens": {
                          "type": "number"
                        },
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        },
                        "completion_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                        },
                        "prompt_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                        }
                      },
                      "required": [
                        "completion_tokens",
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                    }
                  },
                  "required": [
                    "id",
                    "choices",
                    "created",
                    "model",
                    "object"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/microsoft-365-copilot/{agentId}/chat/completions": {
      "post": {
        "operationId": "microsoft365CopilotChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Microsoft 365 Copilot for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "developer"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L936"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "system"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1318"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "input_audio"
                                            ]
                                          },
                                          "input_audio": {
                                            "type": "object",
                                            "properties": {
                                              "data": {
                                                "type": "string"
                                              },
                                              "format": {
                                                "type": "string",
                                                "enum": [
                                                  "wav",
                                                  "mp3"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "data",
                                              "format"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L792"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "input_audio"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L782"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "file"
                                            ]
                                          },
                                          "file": {
                                            "type": "object",
                                            "properties": {
                                              "file_data": {
                                                "type": "string"
                                              },
                                              "file_id": {
                                                "type": "string"
                                              },
                                              "filename": {
                                                "type": "string"
                                              }
                                            },
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L732"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "file"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L722"
                                      }
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L711"
                                  }
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "user"
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content",
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1434"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "assistant"
                              ]
                            },
                            "audio": {
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ]
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "text"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                  }
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "refusal"
                                        ]
                                      },
                                      "refusal": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "refusal"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L805"
                                  }
                                }
                              ]
                            },
                            "function_call": {
                              "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                              "nullable": true,
                              "type": "object",
                              "properties": {
                                "arguments": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "arguments",
                                "name"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "reasoning_content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "refusal": {
                              "nullable": true,
                              "type": "string"
                            },
                            "tool_calls": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "arguments": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "arguments",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "custom"
                                        ]
                                      },
                                      "custom": {
                                        "type": "object",
                                        "properties": {
                                          "input": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "input",
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "type",
                                      "custom"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                  }
                                ],
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                              }
                            }
                          },
                          "required": [
                            "role"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L374"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "tool"
                              ]
                            },
                            "content": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "text"
                                            ]
                                          },
                                          "text": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "text"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L821"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "image_url"
                                            ]
                                          },
                                          "image_url": {
                                            "type": "object",
                                            "properties": {
                                              "url": {
                                                "type": "string"
                                              },
                                              "detail": {
                                                "type": "string",
                                                "enum": [
                                                  "auto",
                                                  "low",
                                                  "high"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "url"
                                            ],
                                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L765"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "image_url"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L755"
                                      }
                                    ]
                                  }
                                }
                              ]
                            },
                            "tool_call_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "tool_call_id"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1413"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "role": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "content": {
                              "nullable": true,
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "role",
                            "content",
                            "name"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L968"
                        }
                      ],
                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1186"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "function": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                  "type": "object",
                                  "additionalProperties": {}
                                },
                                "strict": {
                                  "nullable": true,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                            }
                          },
                          "required": [
                            "type",
                            "function"
                          ],
                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "custom"
                              ]
                            },
                            "custom": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name of the custom tool, used to identify it in tool calls"
                                },
                                "description": {
                                  "description": "Optional description of the custom tool, used to provide more context",
                                  "type": "string"
                                },
                                "format": {
                                  "description": "The input format for the custom tool. Default is unconstrained text.",
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "text"
                                          ],
                                          "description": "Unconstrained text format. Always `text`"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "description": "Unconstrained free-form text"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "grammar"
                                          ]
                                        },
                                        "grammar": {
                                          "type": "object",
                                          "properties": {
                                            "definition": {
                                              "type": "string",
                                              "description": "The grammar definition"
                                            },
                                            "syntax": {
                                              "type": "string",
                                              "enum": [
                                                "lark",
                                                "regex"
                                              ],
                                              "description": "The syntax of the grammar definition"
                                            }
                                          },
                                          "required": [
                                            "definition",
                                            "syntax"
                                          ],
                                          "description": "Your chosen grammar"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "grammar"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "custom"
                          ],
                          "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                        }
                      ],
                      "description": "\n  A function tool that can be used to generate a response.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1392\n  "
                    }
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "none",
                          "auto",
                          "required"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "allowed_tools"
                            ]
                          },
                          "allowed_tools": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "required"
                                ],
                                "description": "\n    Constrains the tools available to the model to a pre-defined set.\n\n    auto allows the model to pick from among the allowed tools and generate a\n    message.\n\n    required requires the model to call one or more of the allowed tools.\n    "
                              },
                              "tools": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "function"
                                        ]
                                      },
                                      "function": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "parameters": {
                                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                            "type": "object",
                                            "additionalProperties": {}
                                          },
                                          "strict": {
                                            "nullable": true,
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "name"
                                        ],
                                        "description": "https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L174"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "function"
                                    ],
                                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L988"
                                  }
                                },
                                "description": "A list of tool definitions that the model should be allowed to call"
                              }
                            },
                            "required": [
                              "mode",
                              "tools"
                            ],
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1455"
                          }
                        },
                        "required": [
                          "type",
                          "allowed_tools"
                        ],
                        "description": "\n  Constrains the tools available to the model to a pre-defined set.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L359\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "function"
                            ]
                          },
                          "function": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "function"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific function.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1207-L1214\n  "
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "custom"
                            ]
                          },
                          "custom": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The name of the custom tool, used to identify it in tool calls"
                              },
                              "description": {
                                "description": "Optional description of the custom tool, used to provide more context",
                                "type": "string"
                              },
                              "format": {
                                "description": "The input format for the custom tool. Default is unconstrained text.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "text"
                                        ],
                                        "description": "Unconstrained text format. Always `text`"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "description": "Unconstrained free-form text"
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "grammar"
                                        ]
                                      },
                                      "grammar": {
                                        "type": "object",
                                        "properties": {
                                          "definition": {
                                            "type": "string",
                                            "description": "The grammar definition"
                                          },
                                          "syntax": {
                                            "type": "string",
                                            "enum": [
                                              "lark",
                                              "regex"
                                            ],
                                            "description": "The syntax of the grammar definition"
                                          }
                                        },
                                        "required": [
                                          "definition",
                                          "syntax"
                                        ],
                                        "description": "Your chosen grammar"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "grammar"
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "custom"
                        ],
                        "description": "\n  Specifies a tool the model should use. Use to force the model to call a specific custom tool.\n\n  https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1229-L1236\n  "
                      }
                    ],
                    "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1405"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "max_completion_tokens": {
                    "nullable": true,
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  },
                  "reasoning_effort": {
                    "nullable": true,
                    "type": "string",
                    "enum": [
                      "none",
                      "minimal",
                      "low",
                      "medium",
                      "high",
                      "xhigh"
                    ]
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "model",
                  "messages"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "choices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "finish_reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "stop",
                                  "length",
                                  "tool_calls",
                                  "content_filter",
                                  "function_call"
                                ]
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "index": {
                            "type": "number"
                          },
                          "logprobs": {
                            "nullable": true
                          },
                          "message": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "refusal": {
                                "nullable": true,
                                "type": "string"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "annotations": {
                                "nullable": true,
                                "type": "array",
                                "items": {}
                              },
                              "audio": {
                                "nullable": true
                              },
                              "function_call": {
                                "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L431",
                                "nullable": true,
                                "type": "object",
                                "properties": {
                                  "arguments": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "arguments",
                                  "name"
                                ],
                                "additionalProperties": false
                              },
                              "reasoning_content": {
                                "nullable": true,
                                "type": "string"
                              },
                              "tool_calls": {
                                "nullable": true,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "function"
                                          ]
                                        },
                                        "function": {
                                          "type": "object",
                                          "properties": {
                                            "arguments": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "arguments",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1165"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "function"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1144"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "custom"
                                          ]
                                        },
                                        "custom": {
                                          "type": "object",
                                          "properties": {
                                            "input": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "input",
                                            "name"
                                          ],
                                          "additionalProperties": false,
                                          "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1128"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "custom"
                                      ],
                                      "additionalProperties": false,
                                      "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1107"
                                    }
                                  ],
                                  "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1197"
                                }
                              }
                            },
                            "required": [
                              "role"
                            ],
                            "additionalProperties": false,
                            "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L1000"
                          }
                        },
                        "required": [
                          "finish_reason",
                          "logprobs",
                          "message"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/openai/openai-node/blob/v6.0.0/src/resources/chat/completions/completions.ts#L311"
                      }
                    },
                    "created": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "chat.completion"
                      ]
                    },
                    "server_tier": {
                      "type": "string"
                    },
                    "system_fingerprint": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "completion_tokens": {
                          "type": "number"
                        },
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        },
                        "completion_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L144"
                        },
                        "prompt_tokens_details": {
                          "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L173"
                        }
                      },
                      "required": [
                        "completion_tokens",
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/openai/openai-node/blob/master/src/resources/completions.ts#L113"
                    }
                  },
                  "required": [
                    "id",
                    "choices",
                    "created",
                    "model",
                    "object"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/microsoft-365-copilot/models": {
      "get": {
        "operationId": "microsoft365CopilotListModelsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List Microsoft 365 Copilot models (default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/microsoft-365-copilot/{agentId}/models": {
      "get": {
        "operationId": "microsoft365CopilotListModelsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List Microsoft 365 Copilot models (specific agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/minimax/chat/completions": {
      "post": {
        "operationId": "minimaxChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with MiniMax (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MinimaxChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MinimaxChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/minimax/{agentId}/chat/completions": {
      "post": {
        "operationId": "minimaxChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with MiniMax for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MinimaxChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MinimaxChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/mistral/embeddings": {
      "post": {
        "operationId": "mistralEmbeddingsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Mistral (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/mistral/{agentId}/embeddings": {
      "post": {
        "operationId": "mistralEmbeddingsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Mistral for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/mistral/chat/completions": {
      "post": {
        "operationId": "mistralChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Mistral (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MistralChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/mistral/{agentId}/chat/completions": {
      "post": {
        "operationId": "mistralChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Mistral for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MistralChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/model-router/models": {
      "get": {
        "operationId": "modelRouterListModelsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List OpenAI-compatible model ids available through the model router (default LLM proxy)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/model-router/{agentId}/models": {
      "get": {
        "operationId": "modelRouterListModelsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List OpenAI-compatible model ids available through the model router (specific LLM proxy)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/model-router/responses": {
      "post": {
        "operationId": "modelRouterResponsesWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response through the OpenAI-compatible model router (default LLM proxy)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {},
                "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
              }
            }
          },
          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "model",
                    "output",
                    "status"
                  ],
                  "additionalProperties": {},
                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/model-router/{agentId}/responses": {
      "post": {
        "operationId": "modelRouterResponsesWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response through the OpenAI-compatible model router (specific LLM proxy)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {},
                "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
              }
            }
          },
          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "model",
                    "output",
                    "status"
                  ],
                  "additionalProperties": {},
                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/model-router/embeddings": {
      "post": {
        "operationId": "modelRouterEmbeddingsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings through the OpenAI-compatible model router (default LLM proxy)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/model-router/{agentId}/embeddings": {
      "post": {
        "operationId": "modelRouterEmbeddingsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings through the OpenAI-compatible model router (specific LLM proxy)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/model-router/chat/completions": {
      "post": {
        "operationId": "modelRouterChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion through the OpenAI-compatible model router (default LLM proxy)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAiChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/model-router/{agentId}/chat/completions": {
      "post": {
        "operationId": "modelRouterChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion through the OpenAI-compatible model router (specific LLM proxy)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAiChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/initiate": {
      "post": {
        "operationId": "initiateOAuth",
        "tags": [
          "OAuth"
        ],
        "description": "Initiate OAuth flow for MCP server installation\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:create`: Install MCP servers from the registry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "catalogId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "serverId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "catalogId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizationUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "state": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "authorizationUrl",
                    "state"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:create"
          ]
        }
      }
    },
    "/api/oauth/callback": {
      "post": {
        "operationId": "handleOAuthCallback",
        "tags": [
          "OAuth"
        ],
        "description": "Handle OAuth callback and exchange code for tokens\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:create`: Install MCP servers from the registry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "iss": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "state"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "catalogId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "accessToken": {
                      "type": "string"
                    },
                    "refreshToken": {
                      "type": "string"
                    },
                    "expiresIn": {
                      "type": "number"
                    },
                    "secretId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "required": [
                    "success",
                    "catalogId",
                    "name",
                    "accessToken",
                    "secretId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:create"
          ]
        }
      }
    },
    "/.well-known/oauth-protected-resource/{*}": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "*",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resource": {
                      "type": "string"
                    },
                    "authorization_servers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "scopes_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "bearer_methods_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "resource",
                    "authorization_servers",
                    "scopes_supported",
                    "bearer_methods_supported"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "issuer": {
                      "type": "string"
                    },
                    "authorization_endpoint": {
                      "type": "string"
                    },
                    "token_endpoint": {
                      "type": "string"
                    },
                    "registration_endpoint": {
                      "type": "string"
                    },
                    "jwks_uri": {
                      "type": "string"
                    },
                    "response_types_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "grant_types_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "token_endpoint_auth_methods_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "code_challenge_methods_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "scopes_supported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "client_id_metadata_document_supported": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "issuer",
                    "authorization_endpoint",
                    "token_endpoint",
                    "jwks_uri",
                    "response_types_supported",
                    "grant_types_supported",
                    "token_endpoint_auth_methods_supported",
                    "code_challenge_methods_supported",
                    "scopes_supported",
                    "client_id_metadata_document_supported"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/ollama-native/api/chat": {
      "post": {
        "operationId": "ollamaNativeChatWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Ollama native /api/chat (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OllamaNativeChatRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for Ollama (typically not required)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OllamaNativeChatResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/ollama-native/{agentId}/api/chat": {
      "post": {
        "operationId": "ollamaNativeChatWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Ollama native /api/chat for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OllamaNativeChatRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for Ollama (typically not required)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OllamaNativeChatResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/ollama/embeddings": {
      "post": {
        "operationId": "ollamaEmbeddingsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Ollama (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/ollama/{agentId}/embeddings": {
      "post": {
        "operationId": "ollamaEmbeddingsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Ollama for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/ollama/chat/completions": {
      "post": {
        "operationId": "ollamaChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Ollama (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OllamaChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for Ollama (typically not required)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OllamaChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/ollama/{agentId}/chat/completions": {
      "post": {
        "operationId": "ollamaChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Ollama for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OllamaChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for Ollama (typically not required)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OllamaChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/onboarding/seen-nav-items": {
      "get": {
        "operationId": "getOnboardingSeenNavItems",
        "tags": [
          "Onboarding"
        ],
        "description": "Get the onboarding nav items (red-dot nudges) the current user has already visited\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      },
      "post": {
        "operationId": "markOnboardingNavItemsSeen",
        "tags": [
          "Onboarding"
        ],
        "description": "Mark onboarding nav items (red-dot nudges) as visited for the current user; idempotent\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    }
                  }
                },
                "required": [
                  "items"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/onboarding/survey-eligibility": {
      "get": {
        "operationId": "getOnboardingSurveyEligibility",
        "tags": [
          "Onboarding"
        ],
        "description": "Whether the first-login onboarding survey should be shown: unlicensed instance, no LLM/MCP activity yet, not already submitted for the organization\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`organizationSettings:update`: Customize organization appearance, authentication, etc",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "eligible": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "eligible"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "organizationSettings:update"
          ]
        }
      }
    },
    "/api/onboarding/survey": {
      "post": {
        "operationId": "submitOnboardingSurvey",
        "tags": [
          "Onboarding"
        ],
        "description": "Submit the first-login onboarding survey; forwarded to the website and recorded once per organization\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`organizationSettings:update`: Customize organization appearance, authentication, etc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "workEnvironment": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "referralSource": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "workEmail": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  }
                },
                "required": [
                  "role",
                  "workEnvironment",
                  "referralSource"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "organizationSettings:update"
          ]
        }
      }
    },
    "/api/onboarding/feedback-popup-activation": {
      "get": {
        "operationId": "getFeedbackPopupActivation",
        "tags": [
          "Onboarding"
        ],
        "description": "When the instance got activated for the feedback pop-up: an MCP server connected AND a successful tool call routed. Null until both happened, and always null on enterprise-licensed instances.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`organizationSettings:update`: Customize organization appearance, authentication, etc",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "activatedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    }
                  },
                  "required": [
                    "activatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "organizationSettings:update"
          ]
        }
      }
    },
    "/v1/openai/embeddings": {
      "post": {
        "operationId": "openAiEmbeddingsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with OpenAI (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/openai/{agentId}/embeddings": {
      "post": {
        "operationId": "openAiEmbeddingsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with OpenAI for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/openai/responses": {
      "post": {
        "operationId": "openAiResponsesWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response with OpenAI (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {},
                "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
              }
            }
          },
          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "model",
                    "output",
                    "status"
                  ],
                  "additionalProperties": {},
                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/openai/{agentId}/responses": {
      "post": {
        "operationId": "openAiResponsesWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response with OpenAI for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {},
                "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
              }
            }
          },
          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "model",
                    "output",
                    "status"
                  ],
                  "additionalProperties": {},
                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/openai/chat/completions": {
      "post": {
        "operationId": "openAiChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with OpenAI (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAiChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/openai/{agentId}/chat/completions": {
      "post": {
        "operationId": "openAiChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with OpenAI for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenAiChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/openai/models": {
      "get": {
        "operationId": "openAiListModelsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List OpenAI models (default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/openai/{agentId}/models": {
      "get": {
        "operationId": "openAiListModelsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "List OpenAI models (specific agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string",
                            "enum": [
                              "model"
                            ]
                          },
                          "created": {
                            "type": "number"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "object",
                          "created",
                          "owned_by"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/openai-codex-auth/device/start": {
      "post": {
        "operationId": "openaiCodexDeviceAuthStart",
        "tags": [
          "OpenAI Codex Auth"
        ],
        "description": "Start the ChatGPT/Codex OAuth device flow used to connect a ChatGPT subscription as an OpenAI provider credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deviceAuthId": {
                      "type": "string"
                    },
                    "userCode": {
                      "type": "string"
                    },
                    "verificationUri": {
                      "type": "string"
                    },
                    "interval": {
                      "type": "number"
                    },
                    "expiresIn": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "deviceAuthId",
                    "userCode",
                    "verificationUri",
                    "interval",
                    "expiresIn"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/openai-codex-auth/device/poll": {
      "post": {
        "operationId": "openaiCodexDeviceAuthPoll",
        "tags": [
          "OpenAI Codex Auth"
        ],
        "description": "Poll the ChatGPT/Codex OAuth device flow once; returns the encoded provider credential when the user has authorized\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deviceAuthId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "userCode": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "deviceAuthId",
                  "userCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "slow_down"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "complete"
                          ]
                        },
                        "credential": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "credential"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/v1/openrouter/chat/completions": {
      "post": {
        "operationId": "openrouterChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with OpenRouter (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenrouterChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenrouterChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/openrouter/{agentId}/chat/completions": {
      "post": {
        "operationId": "openrouterChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with OpenRouter for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenrouterChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenrouterChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/optimization-rules": {
      "get": {
        "operationId": "getOptimizationRules",
        "tags": [
          "Optimization Rules"
        ],
        "description": "Get all optimization rules for the organization\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`optimizationRule:read`: View optimization rules",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "entityType": {
                        "type": "string",
                        "enum": [
                          "organization",
                          "team",
                          "agent"
                        ]
                      },
                      "entityId": {
                        "type": "string"
                      },
                      "conditions": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "maxLength": {
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "maxLength"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "hasTools": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "hasTools"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "provider": {
                        "type": "string",
                        "enum": [
                          "openai",
                          "gemini",
                          "anthropic",
                          "bedrock",
                          "cohere",
                          "cerebras",
                          "mistral",
                          "perplexity",
                          "groq",
                          "xai",
                          "openrouter",
                          "vllm",
                          "ollama",
                          "ollama-native",
                          "zhipuai",
                          "deepseek",
                          "minimax",
                          "kimi",
                          "azure",
                          "github-copilot",
                          "microsoft-365-copilot",
                          "archestra"
                        ]
                      },
                      "targetModel": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "entityType",
                      "entityId",
                      "conditions",
                      "provider",
                      "targetModel",
                      "enabled",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "optimizationRule:read"
          ]
        }
      },
      "post": {
        "operationId": "createOptimizationRule",
        "tags": [
          "Optimization Rules"
        ],
        "description": "Create a new optimization rule for the organization\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`optimizationRule:create`: Create new optimization rules",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "entityType": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "team",
                      "agent"
                    ]
                  },
                  "entityId": {
                    "type": "string"
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "maxLength": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "maxLength"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "hasTools": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "hasTools"
                          ]
                        }
                      ]
                    }
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "gemini",
                      "anthropic",
                      "bedrock",
                      "cohere",
                      "cerebras",
                      "mistral",
                      "perplexity",
                      "groq",
                      "xai",
                      "openrouter",
                      "vllm",
                      "ollama",
                      "ollama-native",
                      "zhipuai",
                      "deepseek",
                      "minimax",
                      "kimi",
                      "azure",
                      "github-copilot",
                      "microsoft-365-copilot",
                      "archestra"
                    ]
                  },
                  "targetModel": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "createdAt": {},
                  "updatedAt": {}
                },
                "required": [
                  "entityType",
                  "entityId",
                  "conditions",
                  "provider",
                  "targetModel"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "entityType": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "agent"
                      ]
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "maxLength": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "maxLength"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "hasTools": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "hasTools"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "targetModel": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "entityType",
                    "entityId",
                    "conditions",
                    "provider",
                    "targetModel",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "optimizationRule:create"
          ]
        }
      }
    },
    "/api/optimization-rules/{id}": {
      "get": {
        "operationId": "getOptimizationRule",
        "tags": [
          "Optimization Rules"
        ],
        "description": "Get an optimization rule by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`optimizationRule:read`: View optimization rules",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "entityType": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "agent"
                      ]
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "maxLength": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "maxLength"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "hasTools": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "hasTools"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "targetModel": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "entityType",
                    "entityId",
                    "conditions",
                    "provider",
                    "targetModel",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "optimizationRule:read"
          ]
        }
      },
      "put": {
        "operationId": "updateOptimizationRule",
        "tags": [
          "Optimization Rules"
        ],
        "description": "Update an optimization rule\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`optimizationRule:update`: Modify optimization rules",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "entityType": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "team",
                      "agent"
                    ]
                  },
                  "entityId": {
                    "type": "string"
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "maxLength": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "maxLength"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "hasTools": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "hasTools"
                          ]
                        }
                      ]
                    }
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "openai",
                      "gemini",
                      "anthropic",
                      "bedrock",
                      "cohere",
                      "cerebras",
                      "mistral",
                      "perplexity",
                      "groq",
                      "xai",
                      "openrouter",
                      "vllm",
                      "ollama",
                      "ollama-native",
                      "zhipuai",
                      "deepseek",
                      "minimax",
                      "kimi",
                      "azure",
                      "github-copilot",
                      "microsoft-365-copilot",
                      "archestra"
                    ]
                  },
                  "targetModel": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "createdAt": {},
                  "updatedAt": {}
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "entityType": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "agent"
                      ]
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "conditions": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "maxLength": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "maxLength"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "hasTools": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "hasTools"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "targetModel": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "entityType",
                    "entityId",
                    "conditions",
                    "provider",
                    "targetModel",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "optimizationRule:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteOptimizationRule",
        "tags": [
          "Optimization Rules"
        ],
        "description": "Delete an optimization rule\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`optimizationRule:delete`: Remove optimization rules",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "optimizationRule:delete"
          ]
        }
      }
    },
    "/api/roles": {
      "get": {
        "operationId": "getRoles",
        "tags": [
          "Roles"
        ],
        "description": "Get all roles in the organization\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`ac:read`: View custom roles and their permissions",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "name",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "permission": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "create",
                                  "read",
                                  "update",
                                  "delete",
                                  "team-admin",
                                  "admin",
                                  "cancel",
                                  "enable",
                                  "query",
                                  "execute",
                                  "deploy-to-restricted",
                                  "manage",
                                  "manage-deleted",
                                  "read-all",
                                  "share-org",
                                  "impersonate"
                                ]
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "predefined": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "role",
                          "name",
                          "description",
                          "permission",
                          "createdAt",
                          "updatedAt",
                          "predefined"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "ac:read"
          ]
        }
      },
      "post": {
        "operationId": "createRole",
        "tags": [
          "Roles"
        ],
        "description": "Create a new custom role\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`ac:create`: Create new custom roles",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "permission": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "create",
                          "read",
                          "update",
                          "delete",
                          "team-admin",
                          "admin",
                          "cancel",
                          "enable",
                          "query",
                          "execute",
                          "deploy-to-restricted",
                          "manage",
                          "manage-deleted",
                          "read-all",
                          "share-org",
                          "impersonate"
                        ]
                      }
                    }
                  }
                },
                "required": [
                  "name",
                  "permission"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "permission": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "create",
                            "read",
                            "update",
                            "delete",
                            "team-admin",
                            "admin",
                            "cancel",
                            "enable",
                            "query",
                            "execute",
                            "deploy-to-restricted",
                            "manage",
                            "manage-deleted",
                            "read-all",
                            "share-org",
                            "impersonate"
                          ]
                        }
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "predefined": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "role",
                    "name",
                    "description",
                    "permission",
                    "createdAt",
                    "updatedAt",
                    "predefined"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "ac:create"
          ]
        }
      }
    },
    "/api/roles/{roleId}": {
      "get": {
        "operationId": "getRole",
        "tags": [
          "Roles"
        ],
        "description": "Get a specific role by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`ac:read`: View custom roles and their permissions",
        "parameters": [
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "admin",
                    "platform_admin",
                    "editor",
                    "member"
                  ]
                },
                {
                  "type": "string",
                  "minLength": 1,
                  "description": "Custom role ID (base62)"
                }
              ]
            },
            "in": "path",
            "name": "roleId",
            "required": true,
            "description": "Predefined role name or custom role ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "permission": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "create",
                            "read",
                            "update",
                            "delete",
                            "team-admin",
                            "admin",
                            "cancel",
                            "enable",
                            "query",
                            "execute",
                            "deploy-to-restricted",
                            "manage",
                            "manage-deleted",
                            "read-all",
                            "share-org",
                            "impersonate"
                          ]
                        }
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "predefined": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "role",
                    "name",
                    "description",
                    "permission",
                    "createdAt",
                    "updatedAt",
                    "predefined"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "ac:read"
          ]
        }
      },
      "put": {
        "operationId": "updateRole",
        "tags": [
          "Roles"
        ],
        "description": "Update a custom role\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`ac:update`: Modify custom role permissions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "permission": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "create",
                          "read",
                          "update",
                          "delete",
                          "team-admin",
                          "admin",
                          "cancel",
                          "enable",
                          "query",
                          "execute",
                          "deploy-to-restricted",
                          "manage",
                          "manage-deleted",
                          "read-all",
                          "share-org",
                          "impersonate"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "admin",
                    "platform_admin",
                    "editor",
                    "member"
                  ]
                },
                {
                  "type": "string",
                  "minLength": 1,
                  "description": "Custom role ID (base62)"
                }
              ]
            },
            "in": "path",
            "name": "roleId",
            "required": true,
            "description": "Predefined role name or custom role ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "permission": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "create",
                            "read",
                            "update",
                            "delete",
                            "team-admin",
                            "admin",
                            "cancel",
                            "enable",
                            "query",
                            "execute",
                            "deploy-to-restricted",
                            "manage",
                            "manage-deleted",
                            "read-all",
                            "share-org",
                            "impersonate"
                          ]
                        }
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "predefined": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "role",
                    "name",
                    "description",
                    "permission",
                    "createdAt",
                    "updatedAt",
                    "predefined"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "ac:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteRole",
        "tags": [
          "Roles"
        ],
        "description": "Delete a custom role\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`ac:delete`: Delete custom roles",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "path",
            "name": "roleId",
            "required": true,
            "description": "Custom role ID (base62)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "ac:delete"
          ]
        }
      }
    },
    "/api/organization": {
      "get": {
        "operationId": "getOrganization",
        "tags": [
          "Organization"
        ],
        "description": "Get organization details\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/organization/appearance-settings": {
      "patch": {
        "operationId": "updateAppearanceSettings",
        "tags": [
          "Organization"
        ],
        "description": "Update appearance settings\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`organizationSettings:update`: Customize organization appearance, authentication, etc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "theme": {
                    "type": "string",
                    "enum": [
                      "modern-minimal",
                      "clean-slate",
                      "mono",
                      "twitter",
                      "tangerine",
                      "bubblegum",
                      "caffeine",
                      "amber-minimal",
                      "cosmic-night",
                      "doom-64",
                      "mocha-mousse",
                      "nature",
                      "sunset-horizon",
                      "neo-brutalism",
                      "vercel",
                      "claude",
                      "vintage-paper",
                      "boxy-minimalistic",
                      "catppuccin",
                      "solarized-dark",
                      "gruvbox-dark",
                      "dracula-dark",
                      "monokai-dark",
                      "moonlight-dark"
                    ]
                  },
                  "customFont": {
                    "type": "string",
                    "enum": [
                      "lato",
                      "inter",
                      "open-sans",
                      "roboto",
                      "source-sans-pro",
                      "jetbrains-mono"
                    ]
                  },
                  "logo": {
                    "nullable": true,
                    "type": "string"
                  },
                  "logoDark": {
                    "nullable": true,
                    "type": "string"
                  },
                  "favicon": {
                    "nullable": true,
                    "type": "string"
                  },
                  "iconLogo": {
                    "nullable": true,
                    "type": "string"
                  },
                  "iconLogoDark": {
                    "nullable": true,
                    "type": "string"
                  },
                  "appName": {
                    "nullable": true,
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[\\p{L}\\p{N}][\\p{L}\\p{N} .,'’\\-&()+:!?_/]*$"
                  },
                  "ogDescription": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 500
                  },
                  "footerText": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 500
                  },
                  "chatLinks": {
                    "nullable": true,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "label",
                        "url"
                      ]
                    }
                  },
                  "onboardingWizard": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 25
                      },
                      "pages": {
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "image": {
                              "nullable": true,
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "content"
                          ]
                        }
                      }
                    },
                    "required": [
                      "label",
                      "pages"
                    ]
                  },
                  "chatErrorSupportMessage": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 500
                  },
                  "slimChatErrorUi": {
                    "type": "boolean"
                  },
                  "chatPlaceholders": {
                    "nullable": true,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "animateChatPlaceholders": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "organizationSettings:update"
          ]
        }
      },
      "get": {
        "operationId": "getAppearanceSettings",
        "tags": [
          "Organization"
        ],
        "description": "Get organization appearance settings\n\nAuthentication:\n\nNot required.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "theme",
                    "customFont",
                    "logo",
                    "logoDark",
                    "favicon",
                    "iconLogo",
                    "iconLogoDark",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "animateChatPlaceholders"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/organization/security-settings": {
      "patch": {
        "operationId": "updateSecuritySettings",
        "tags": [
          "Organization"
        ],
        "description": "Update security settings (default tool guardrails, chat file uploads, Apps Hackathon recorder)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentSettings:update`: Modify agent settings (default model, default agent, default tool guardrails, file uploads, Apps Hackathon recorder)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaultDiscoveredToolInvocationPolicy": {
                    "type": "string",
                    "enum": [
                      "allow_when_context_is_untrusted",
                      "block_when_context_is_untrusted",
                      "block_always",
                      "require_approval"
                    ]
                  },
                  "defaultDiscoveredToolResultPolicy": {
                    "type": "string",
                    "enum": [
                      "block_always",
                      "mark_as_trusted",
                      "mark_as_untrusted",
                      "sanitize_with_dual_llm"
                    ]
                  },
                  "allowChatFileUploads": {
                    "type": "boolean"
                  },
                  "appsHackathonRecorderEnabled": {
                    "type": "boolean"
                  },
                  "newAppsDisabledByDefault": {
                    "type": "boolean"
                  },
                  "newAppsLockedByDefault": {
                    "type": "boolean"
                  },
                  "allowToolAutoAssignment": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentSettings:update"
          ]
        }
      }
    },
    "/api/organization/llm-settings": {
      "patch": {
        "operationId": "updateLlmSettings",
        "tags": [
          "Organization"
        ],
        "description": "Update LLM settings (TOON compression, compression scope)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmSettings:update`: Modify LLM settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "convertToolResultsToToon": {
                    "type": "boolean"
                  },
                  "compressionScope": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "team"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmSettings:update"
          ]
        }
      }
    },
    "/api/organization/mcp-settings": {
      "patch": {
        "operationId": "updateMcpSettings",
        "tags": [
          "Organization"
        ],
        "description": "Update MCP settings (online catalog availability)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpSettings:update`: Modify MCP settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "onlineMcpCatalogEnabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpSettings:update"
          ]
        }
      }
    },
    "/api/organization/skills-settings": {
      "patch": {
        "operationId": "updateSkillsSettings",
        "tags": [
          "Organization"
        ],
        "description": "Update Skills settings (online catalog availability)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skillsSettings:update`: Modify Skills settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "onlineSkillCatalogEnabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skillsSettings:update"
          ]
        }
      }
    },
    "/api/organization/agent-settings": {
      "patch": {
        "operationId": "updateAgentSettings",
        "tags": [
          "Organization"
        ],
        "description": "Update agent settings (default model, default agent, skill slash commands)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agentSettings:update`: Modify agent settings (default model, default agent, default tool guardrails, file uploads, Apps Hackathon recorder)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaultModelId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "defaultLlmApiKeyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "defaultAgentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agentSettings:update"
          ]
        }
      }
    },
    "/api/organization/connection-settings": {
      "patch": {
        "operationId": "updateConnectionSettings",
        "tags": [
          "Organization"
        ],
        "description": "Update /connection admin settings (default gateway/proxy, hidden clients/providers)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`organizationSettings:update`: Customize organization appearance, authentication, etc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectionDefaultMcpGatewayId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "connectionDefaultProviderKeys": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "connectionDefaultLlmProxyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "connectionDefaultClientId": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 64
                  },
                  "connectionShownClientIds": {
                    "nullable": true,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 64
                    }
                  },
                  "connectionShownProviders": {
                    "nullable": true,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    }
                  },
                  "connectionBaseUrls": {
                    "nullable": true,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "description": {
                          "default": "",
                          "type": "string",
                          "maxLength": 500
                        },
                        "isDefault": {
                          "default": false,
                          "type": "boolean"
                        },
                        "visible": {
                          "default": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "url"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "organizationSettings:update"
          ]
        }
      }
    },
    "/api/organization/default-environment": {
      "patch": {
        "operationId": "updateDefaultEnvironment",
        "tags": [
          "Organization"
        ],
        "description": "Configure the implicit default environment (the deployment target referenced by internal_mcp_catalog.environment_id = null). Pass null for name to reset to the built-in 'Default' label, or null for namespace to unset it. Omitted fields are left unchanged. When the namespace or network policy changes and the runtime is enabled, all default-environment MCP servers are reconciled.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`environment:update`: Modify deployment environments, including the org default environment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "nullable": true,
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "description": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 500
                  },
                  "namespace": {
                    "nullable": true,
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 63,
                    "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
                  },
                  "networkPolicy": {
                    "nullable": true,
                    "type": "object",
                    "properties": {
                      "egressMode": {
                        "type": "string",
                        "enum": [
                          "off",
                          "restricted",
                          "unrestricted"
                        ]
                      },
                      "domainPreset": {
                        "type": "string",
                        "enum": [
                          "none",
                          "common_dependencies",
                          "package_managers"
                        ]
                      },
                      "allowedDomains": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 253,
                          "pattern": "^(\\*\\.)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$"
                        }
                      },
                      "allowedCidrs": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "restricted": {
                    "type": "boolean"
                  },
                  "validationRegex": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 1000
                  },
                  "trustedImageRegistries": {
                    "nullable": true,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255,
                      "pattern": "^[a-z0-9._:/-]+$"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "environment:update"
          ]
        }
      }
    },
    "/api/organization/auth-settings": {
      "patch": {
        "operationId": "updateAuthSettings",
        "tags": [
          "Organization"
        ],
        "description": "Update organization Auth settings\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`organizationSettings:update`: Customize organization appearance, authentication, etc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "oauthAccessTokenLifetimeSeconds": {
                    "type": "integer",
                    "minimum": 300,
                    "maximum": 31536000
                  },
                  "requireTwoFactor": {
                    "type": "boolean"
                  },
                  "sessionMaxAgeSeconds": {
                    "nullable": true,
                    "type": "integer",
                    "minimum": 3600,
                    "maximum": 31536000
                  },
                  "defaultMemberRole": {
                    "nullable": true,
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "organizationSettings:update"
          ]
        }
      }
    },
    "/api/organization/knowledge-settings": {
      "patch": {
        "operationId": "updateKnowledgeSettings",
        "tags": [
          "Organization"
        ],
        "description": "Update knowledge settings (embedding model)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSettings:update`: Modify knowledge settings (embedding and reranking models)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "embeddingModel": {
                    "nullable": true,
                    "type": "string",
                    "minLength": 1
                  },
                  "embeddingChatApiKeyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "rerankerChatApiKeyId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "rerankerModel": {
                    "nullable": true,
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSettings:update"
          ]
        }
      }
    },
    "/api/organization/knowledge-settings/drop-embedding": {
      "post": {
        "operationId": "dropEmbeddingConfig",
        "tags": [
          "Organization"
        ],
        "description": "Drop the embedding configuration, deleting all KB documents and resetting connector checkpoints\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSettings:update`: Modify knowledge settings (embedding and reranking models)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSettings:update"
          ]
        }
      }
    },
    "/api/organization/knowledge-settings/test-embedding": {
      "post": {
        "operationId": "testEmbeddingConnection",
        "tags": [
          "Organization"
        ],
        "description": "Test the embedding connection by embedding a sample text\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSettings:update`: Modify knowledge settings (embedding and reranking models)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "embeddingChatApiKeyId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "embeddingModel": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "embeddingChatApiKeyId",
                  "embeddingModel"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSettings:update"
          ]
        }
      }
    },
    "/api/organization/knowledge-settings/test-reranker": {
      "post": {
        "operationId": "testRerankerConnection",
        "tags": [
          "Organization"
        ],
        "description": "Test the reranker connection with a sample structured-output call\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`knowledgeSettings:update`: Modify knowledge settings (embedding and reranking models)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rerankerChatApiKeyId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "rerankerModel": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "rerankerChatApiKeyId",
                  "rerankerModel"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "knowledgeSettings:update"
          ]
        }
      }
    },
    "/api/organization/complete-onboarding": {
      "post": {
        "operationId": "completeOnboarding",
        "tags": [
          "Organization"
        ],
        "description": "Mark organization onboarding as complete\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`organizationSettings:update`: Customize organization appearance, authentication, etc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "onboardingComplete": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "onboardingComplete"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "analyticsInstanceId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "logo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "logoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "metadata": {
                      "nullable": true,
                      "type": "string"
                    },
                    "onboardingComplete": {
                      "type": "boolean"
                    },
                    "onboardingSurveyCompletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "theme": {
                      "type": "string",
                      "enum": [
                        "modern-minimal",
                        "clean-slate",
                        "mono",
                        "twitter",
                        "tangerine",
                        "bubblegum",
                        "caffeine",
                        "amber-minimal",
                        "cosmic-night",
                        "doom-64",
                        "mocha-mousse",
                        "nature",
                        "sunset-horizon",
                        "neo-brutalism",
                        "vercel",
                        "claude",
                        "vintage-paper",
                        "boxy-minimalistic",
                        "catppuccin",
                        "solarized-dark",
                        "gruvbox-dark",
                        "dracula-dark",
                        "monokai-dark",
                        "moonlight-dark"
                      ]
                    },
                    "customFont": {
                      "type": "string",
                      "enum": [
                        "lato",
                        "inter",
                        "open-sans",
                        "roboto",
                        "source-sans-pro",
                        "jetbrains-mono"
                      ]
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "compressionScope": {
                      "type": "string",
                      "enum": [
                        "organization",
                        "team"
                      ]
                    },
                    "onlineMcpCatalogEnabled": {
                      "type": "boolean"
                    },
                    "onlineSkillCatalogEnabled": {
                      "type": "boolean"
                    },
                    "defaultDiscoveredToolInvocationPolicy": {
                      "type": "string",
                      "enum": [
                        "allow_when_context_is_untrusted",
                        "block_when_context_is_untrusted",
                        "block_always",
                        "require_approval"
                      ]
                    },
                    "defaultDiscoveredToolResultPolicy": {
                      "type": "string",
                      "enum": [
                        "block_always",
                        "mark_as_trusted",
                        "mark_as_untrusted",
                        "sanitize_with_dual_llm"
                      ]
                    },
                    "allowChatFileUploads": {
                      "type": "boolean"
                    },
                    "allowToolAutoAssignment": {
                      "type": "boolean"
                    },
                    "embeddingModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "embeddingDimensions": {
                      "nullable": true,
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/EmbeddingDimensions"
                        }
                      ]
                    },
                    "embeddingChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerChatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "rerankerModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmModel": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultLlmProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "defaultModelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultLlmApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "defaultUserLimitValue": {
                      "nullable": true,
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "maximum": 9007199254740991
                    },
                    "defaultUserLimitModel": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultUserLimitCleanupInterval": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "1h",
                        "12h",
                        "24h",
                        "1w",
                        "1m",
                        "calendar_day",
                        "calendar_week_sunday",
                        "calendar_week_monday",
                        "calendar_month"
                      ]
                    },
                    "defaultMemberRole": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultAgentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "favicon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "appName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "ogDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "footerText": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatLinks": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 25
                          },
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "onboardingWizard": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 25
                        },
                        "pages": {
                          "minItems": 1,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "image": {
                                "nullable": true,
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "content"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "label",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "chatPlaceholders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "animateChatPlaceholders": {
                      "type": "boolean"
                    },
                    "iconLogo": {
                      "nullable": true,
                      "type": "string"
                    },
                    "iconLogoDark": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatErrorSupportMessage": {
                      "nullable": true,
                      "type": "string"
                    },
                    "slimChatErrorUi": {
                      "type": "boolean"
                    },
                    "requireTwoFactor": {
                      "type": "boolean"
                    },
                    "sessionMaxAgeSeconds": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "oauthAccessTokenLifetimeSeconds": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 31536000
                    },
                    "connectionDefaultMcpGatewayId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultLlmProxyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionDefaultClientId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "connectionShownClientIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionShownProviders": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "connectionBaseUrls": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          "description": {
                            "default": "",
                            "type": "string",
                            "maxLength": 500
                          },
                          "isDefault": {
                            "default": false,
                            "type": "boolean"
                          },
                          "visible": {
                            "default": true,
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "url",
                          "description",
                          "isDefault",
                          "visible"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "connectionDefaultProviderKeys": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "defaultEnvironmentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentNamespace": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentDescription": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultNetworkPolicy": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "egressMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "restricted",
                            "unrestricted"
                          ]
                        },
                        "domainPreset": {
                          "type": "string",
                          "enum": [
                            "none",
                            "common_dependencies",
                            "package_managers"
                          ]
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "allowedCidrs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "egressMode",
                        "domainPreset",
                        "allowedDomains",
                        "allowedCidrs"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEnvironmentRestricted": {
                      "type": "boolean"
                    },
                    "defaultEnvironmentValidationRegex": {
                      "nullable": true,
                      "type": "string"
                    },
                    "defaultEnvironmentTrustedImageRegistries": {
                      "nullable": true,
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "^[a-z0-9._:/-]+$"
                      }
                    },
                    "skillToolsEnabled": {
                      "type": "boolean"
                    },
                    "appsHackathonRecorderEnabled": {
                      "type": "boolean"
                    },
                    "newAppsDisabledByDefault": {
                      "type": "boolean"
                    },
                    "newAppsLockedByDefault": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "analyticsInstanceId",
                    "logo",
                    "logoDark",
                    "createdAt",
                    "metadata",
                    "onboardingComplete",
                    "onboardingSurveyCompletedAt",
                    "theme",
                    "customFont",
                    "convertToolResultsToToon",
                    "compressionScope",
                    "onlineMcpCatalogEnabled",
                    "onlineSkillCatalogEnabled",
                    "defaultDiscoveredToolInvocationPolicy",
                    "defaultDiscoveredToolResultPolicy",
                    "allowChatFileUploads",
                    "allowToolAutoAssignment",
                    "embeddingModel",
                    "embeddingDimensions",
                    "embeddingChatApiKeyId",
                    "rerankerChatApiKeyId",
                    "rerankerModel",
                    "defaultLlmModel",
                    "defaultLlmProvider",
                    "defaultModelId",
                    "defaultLlmApiKeyId",
                    "defaultUserLimitValue",
                    "defaultUserLimitModel",
                    "defaultUserLimitCleanupInterval",
                    "defaultMemberRole",
                    "defaultAgentId",
                    "favicon",
                    "appName",
                    "ogDescription",
                    "footerText",
                    "chatLinks",
                    "onboardingWizard",
                    "chatPlaceholders",
                    "animateChatPlaceholders",
                    "iconLogo",
                    "iconLogoDark",
                    "chatErrorSupportMessage",
                    "slimChatErrorUi",
                    "requireTwoFactor",
                    "sessionMaxAgeSeconds",
                    "oauthAccessTokenLifetimeSeconds",
                    "connectionDefaultMcpGatewayId",
                    "connectionDefaultLlmProxyId",
                    "connectionDefaultClientId",
                    "connectionShownClientIds",
                    "connectionShownProviders",
                    "connectionBaseUrls",
                    "connectionDefaultProviderKeys",
                    "defaultEnvironmentName",
                    "defaultEnvironmentNamespace",
                    "defaultEnvironmentDescription",
                    "defaultNetworkPolicy",
                    "defaultEnvironmentRestricted",
                    "defaultEnvironmentValidationRegex",
                    "defaultEnvironmentTrustedImageRegistries",
                    "skillToolsEnabled",
                    "appsHackathonRecorderEnabled",
                    "newAppsDisabledByDefault",
                    "newAppsLockedByDefault"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "organizationSettings:update"
          ]
        }
      }
    },
    "/api/organization/onboarding-status": {
      "get": {
        "operationId": "getOnboardingStatus",
        "tags": [
          "Organization"
        ],
        "description": "Check if organization onboarding is complete\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hasLlmProxyLogs": {
                      "type": "boolean"
                    },
                    "hasMcpGatewayLogs": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "hasLlmProxyLogs",
                    "hasMcpGatewayLogs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/organization/members/signup-status": {
      "get": {
        "operationId": "getMemberSignupStatus",
        "tags": [
          "Organization"
        ],
        "description": "Get which members have completed signup (have an account record)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pendingSignupMembers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "image": {
                            "nullable": true,
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "provider": {
                            "nullable": true,
                            "type": "string"
                          },
                          "invitationId": {
                            "nullable": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId",
                          "name",
                          "email",
                          "image",
                          "role",
                          "provider",
                          "invitationId"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "pendingSignupMembers"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/organization/members/{userId}/pending-signup": {
      "delete": {
        "operationId": "deletePendingSignupMember",
        "tags": [
          "Organization"
        ],
        "description": "Delete an auto-provisioned member who hasn't completed signup\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`member:delete`: Remove members from the organization",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "userId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "member:delete"
          ]
        }
      }
    },
    "/api/organization/members": {
      "get": {
        "operationId": "getOrganizationMembers",
        "tags": [
          "Organization"
        ],
        "description": "List organization members visible to the caller. Callers with the member:read permission (admins and equivalent custom roles) receive the full organization roster; other authenticated users receive only the members they share a team with.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "email"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/organization/members/{idOrEmail}": {
      "get": {
        "operationId": "getOrganizationMember",
        "tags": [
          "Organization"
        ],
        "description": "Get a member of the organization by user ID or email address\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`member:read`: View organization members and their roles",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "path",
            "name": "idOrEmail",
            "required": true,
            "description": "User ID or email address"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "role"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "member:read"
          ]
        }
      }
    },
    "/v1/perplexity/chat/completions": {
      "post": {
        "operationId": "perplexityChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Perplexity (uses default agent). Note: this endpoint does not support external tool calling; the /responses Agent API endpoint does.\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PerplexityChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerplexityChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/perplexity/{agentId}/chat/completions": {
      "post": {
        "operationId": "perplexityChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Perplexity for a specific agent. Note: this endpoint does not support external tool calling; the /responses Agent API endpoint does.\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PerplexityChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerplexityChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/perplexity/responses": {
      "post": {
        "operationId": "perplexityResponsesWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response with the Perplexity Agent API (uses default agent).\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {},
                "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
              }
            }
          },
          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for the Perplexity Agent API"
          }
        ],
        "responses": {
          "200": {
            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "model",
                    "output",
                    "status"
                  ],
                  "additionalProperties": {},
                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/perplexity/{agentId}/responses": {
      "post": {
        "operationId": "perplexityResponsesWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a response with the Perplexity Agent API for a specific agent.\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      }
                    ]
                  },
                  "instructions": {
                    "nullable": true,
                    "type": "string"
                  },
                  "max_output_tokens": {
                    "nullable": true,
                    "type": "number"
                  },
                  "metadata": {
                    "nullable": true,
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "previous_response_id": {
                    "nullable": true,
                    "type": "string"
                  },
                  "stream": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "temperature": {
                    "nullable": true,
                    "type": "number"
                  },
                  "text": {},
                  "tool_choice": {},
                  "tools": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "function"
                              ]
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "nullable": true,
                              "type": "string"
                            },
                            "parameters": {
                              "nullable": true,
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "strict": {
                              "nullable": true,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "name"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": {},
                          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
                        }
                      ]
                    }
                  },
                  "top_p": {
                    "nullable": true,
                    "type": "number"
                  },
                  "user": {
                    "type": "string"
                  }
                },
                "required": [
                  "model"
                ],
                "additionalProperties": {},
                "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
              }
            }
          },
          "description": "https://developers.openai.com/api/reference/resources/responses/methods/create"
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for the Perplexity Agent API"
          }
        ],
        "responses": {
          "200": {
            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "response"
                      ]
                    },
                    "created_at": {
                      "type": "number"
                    },
                    "model": {
                      "type": "string"
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "message"
                                ]
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "content": {
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "output_text"
                                          ]
                                        },
                                        "text": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "text"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_text%20%3E%20(schema)"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "refusal"
                                          ]
                                        },
                                        "refusal": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "refusal"
                                      ],
                                      "additionalProperties": {},
                                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_refusal%20%3E%20(schema)"
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "role",
                              "status",
                              "content"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_output_message%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "function_call"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "call_id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "arguments": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "call_id",
                              "name",
                              "arguments"
                            ],
                            "additionalProperties": {},
                            "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": {}
                          }
                        ]
                      }
                    },
                    "status": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "number"
                        },
                        "output_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "input_tokens",
                        "output_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": {},
                      "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response_usage%20%3E%20(schema)"
                    }
                  },
                  "required": [
                    "id",
                    "object",
                    "created_at",
                    "model",
                    "output",
                    "status"
                  ],
                  "additionalProperties": {},
                  "description": "https://developers.openai.com/api/reference/resources/responses#(resource)%20responses%20%3E%20(model)%20response%20%3E%20(schema)"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/projects": {
      "post": {
        "operationId": "createProject",
        "tags": [
          "Projects"
        ],
        "description": "Create a project. Files produced in its chats are owned by the project rather than the individual author.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:create`: Create projects",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "description": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 200
                  },
                  "icon": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 1000000
                  },
                  "defaultAgentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "ownerName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "conversationCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "visibility": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "user"
                      ]
                    },
                    "shareTeamNames": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "shareUserNames": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "icon",
                    "viewerRole",
                    "ownerName",
                    "conversationCount",
                    "visibility",
                    "shareTeamNames",
                    "shareUserNames",
                    "pinnedAt",
                    "createdAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:create"
          ]
        }
      },
      "get": {
        "operationId": "getProjects",
        "tags": [
          "Projects"
        ],
        "description": "List projects the caller can see. `scope` is the project's share visibility: `personal` (private), `team` (shared with teams — narrow with `teamIds`), or `org` (org-wide); omitted = all visible. Admins additionally filter `personal` by owner via `authorIds` / `excludeAuthorIds` (ignored for non-admins). `search` matches name + description. `status=deleted` returns the org-wide soft-deleted projects for a project admin (empty for everyone else); the other filters do not apply to that slice.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:read`: View projects and your own chats inside them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "personal",
                "team",
                "org"
              ]
            },
            "in": "query",
            "name": "scope",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "teamIds",
            "required": false,
            "description": "Team IDs (comma-separated); only used when scope=team."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "authorIds",
            "required": false,
            "description": "Owner user IDs (comma-separated). Admin-only; used with scope=personal."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "excludeAuthorIds",
            "required": false,
            "description": "Exclude owner user IDs (comma-separated). Admin-only; used with scope=personal."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Lifecycle slice: `active` (default) or `deleted` (project admins only; org-wide soft-deleted projects for the restore view)."
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "icon": {
                        "nullable": true,
                        "type": "string"
                      },
                      "viewerRole": {
                        "type": "string",
                        "enum": [
                          "owner",
                          "shared",
                          "admin"
                        ]
                      },
                      "ownerName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "conversationCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "visibility": {
                        "nullable": true,
                        "type": "string",
                        "enum": [
                          "organization",
                          "team",
                          "user"
                        ]
                      },
                      "shareTeamNames": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "shareUserNames": {
                        "nullable": true,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "pinnedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "description",
                      "icon",
                      "viewerRole",
                      "ownerName",
                      "conversationCount",
                      "visibility",
                      "shareTeamNames",
                      "shareUserNames",
                      "pinnedAt",
                      "createdAt",
                      "deletedAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:read"
          ]
        }
      }
    },
    "/api/projects/from-conversation": {
      "post": {
        "operationId": "createProjectFromConversation",
        "tags": [
          "Projects"
        ],
        "description": "Turn an existing chat into a project: create the project, move the chat into it, and re-point the chat's files to the project. Only the chat's owner may do this, and only for a user chat not already in a project. `name` defaults to the chat title.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:create`: Create projects",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "description": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 200
                  },
                  "icon": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 1000000
                  }
                },
                "required": [
                  "conversationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "ownerName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "conversationCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "visibility": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "user"
                      ]
                    },
                    "shareTeamNames": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "shareUserNames": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "icon",
                    "viewerRole",
                    "ownerName",
                    "conversationCount",
                    "visibility",
                    "shareTeamNames",
                    "shareUserNames",
                    "pinnedAt",
                    "createdAt",
                    "deletedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:create"
          ]
        }
      }
    },
    "/api/projects/{id}": {
      "get": {
        "operationId": "getProject",
        "tags": [
          "Projects"
        ],
        "description": "Project detail. Share team ids are included for the owner only.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:read`: View projects and your own chats inside them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "ownerName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "conversationCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "visibility": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "user"
                      ]
                    },
                    "shareTeamNames": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "shareUserNames": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "shareTeamIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "shareUserIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultAgent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "icon",
                    "viewerRole",
                    "ownerName",
                    "conversationCount",
                    "visibility",
                    "shareTeamNames",
                    "shareUserNames",
                    "pinnedAt",
                    "createdAt",
                    "deletedAt",
                    "shareTeamIds",
                    "shareUserIds",
                    "defaultAgent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:read"
          ]
        }
      },
      "patch": {
        "operationId": "updateProject",
        "tags": [
          "Projects"
        ],
        "description": "Update a project's name, description, icon, and/or default agent (owner or a project admin). Only the provided fields change. The default agent must be an organization-wide chat agent; null clears it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:update`: Edit project descriptions, instructions, and sharing",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "description": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 200
                  },
                  "icon": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 1000000
                  },
                  "defaultAgentId": {
                    "nullable": true,
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteProject",
        "tags": [
          "Projects"
        ],
        "description": "Soft-delete a project (owner or a project admin). Its chats detach and survive as ordinary conversations; its files and scheduled tasks are retained but hidden, and a project admin can restore them. Nothing is purged.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:delete`: Delete projects",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:delete"
          ]
        }
      }
    },
    "/api/projects/{id}/share": {
      "put": {
        "operationId": "setProjectShare",
        "tags": [
          "Projects"
        ],
        "description": "Set who can see the project (owner or a project admin): the whole organization, specific teams, or nobody (visibility \"none\" unshares).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:update`: Edit project descriptions, instructions, and sharing",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "visibility": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "organization",
                          "team",
                          "user"
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "none"
                        ]
                      }
                    ]
                  },
                  "teamIds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "userIds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "visibility"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:update"
          ]
        }
      }
    },
    "/api/projects/{id}/restore": {
      "post": {
        "operationId": "restoreProject",
        "tags": [
          "Projects"
        ],
        "description": "Restore a soft-deleted project (project admins only). Brings back its retained files and scheduled tasks (schedules resume forward-only, no catch-up runs); chats do NOT re-attach, so the restored project reports zero chats. 404 if there is no soft-deleted project with that id in the org. Deleting frees the display name, so if the owner has since taken it, pass `name` to restore under a different one; restoring into a name that is still taken is a 409.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:delete`: Delete projects",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "name": {
                    "description": "Rename the project as it is restored. Use this when its original name was taken while it was deleted.",
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "icon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "viewerRole": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "shared",
                        "admin"
                      ]
                    },
                    "ownerName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "conversationCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "visibility": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "organization",
                        "team",
                        "user"
                      ]
                    },
                    "shareTeamNames": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "shareUserNames": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "shareTeamIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "shareUserIds": {
                      "nullable": true,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultAgent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "icon",
                    "viewerRole",
                    "ownerName",
                    "conversationCount",
                    "visibility",
                    "shareTeamNames",
                    "shareUserNames",
                    "pinnedAt",
                    "createdAt",
                    "deletedAt",
                    "shareTeamIds",
                    "shareUserIds",
                    "defaultAgent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:delete"
          ]
        }
      }
    },
    "/api/projects/{id}/permanent": {
      "delete": {
        "operationId": "permanentlyDeleteProject",
        "tags": [
          "Projects"
        ],
        "description": "Permanently destroy a soft-deleted project (global admins only). Irreversible, with no grace period: the project, its files (records and stored contents), pins, share configuration, and scheduled tasks are all destroyed. Its chats are unaffected — they detached when it was deleted and survive as ordinary conversations. 404 if there is no soft-deleted project with that id in the org, which is also the answer when the project is still live or the caller is not a global admin. Restore wins a race: if a restore commits first, this returns 404 and the project stays.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nRestricted to the built-in Admin and Platform Admin roles. No permission grants it: `project:delete`, `project:admin`, and ownership of the project all reach the trash, not past it, and a service account never qualifies. A caller without it gets 404, not 403, so the endpoint never confirms the project exists.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Restricted to the built-in Admin and Platform Admin roles. No permission grants it: `project:delete`, `project:admin`, and ownership of the project all reach the trash, not past it, and a service account never qualifies. A caller without it gets 404, not 403, so the endpoint never confirms the project exists.",
          "permissions": []
        }
      }
    },
    "/api/projects/{id}/files": {
      "get": {
        "operationId": "getProjectFiles",
        "tags": [
          "Projects"
        ],
        "description": "Files owned by the project, readable by anyone with project access.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`file:manage`: List, read, write, and delete files in chats and projects\n`project:read`: View projects and your own chats inside them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "downloadRef": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "mimeType": {
                        "type": "string"
                      },
                      "sizeBytes": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "downloadable": {
                        "type": "boolean"
                      },
                      "projectId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "projectName": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "downloadRef",
                      "filename",
                      "mimeType",
                      "sizeBytes",
                      "createdAt",
                      "downloadable",
                      "projectId",
                      "projectName"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "file:manage",
            "project:read"
          ]
        }
      },
      "post": {
        "operationId": "uploadProjectFiles",
        "tags": [
          "Projects"
        ],
        "description": "Upload one file into the project (drag-and-drop on the Files panel). The bytes are base64-encoded in the body; a colliding name is auto-renamed.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`file:manage`: List, read, write, and delete files in chats and projects\n`project:read`: View projects and your own chats inside them",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "mimeType": {
                    "type": "string"
                  },
                  "dataBase64": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "name",
                  "mimeType",
                  "dataBase64"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "filename",
                    "mimeType"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "file:manage",
            "project:read"
          ]
        }
      }
    },
    "/api/projects/{id}/instructions": {
      "get": {
        "operationId": "getProjectInstructions",
        "tags": [
          "Projects"
        ],
        "description": "The project's instructions (markdown). Readable by anyone with project access; empty until the owner first saves it. The content is injected into the system prompt of every chat in the project.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:read`: View projects and your own chats inside them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "content"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:read"
          ]
        }
      },
      "put": {
        "operationId": "setProjectInstructions",
        "tags": [
          "Projects"
        ],
        "description": "Set the project's instructions (owner only). The first save creates the instructions file; saving empty content keeps it but injects nothing.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:update`: Edit project descriptions, instructions, and sharing",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "maxLength": 100000
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:update"
          ]
        }
      }
    },
    "/api/projects/{id}/conversations": {
      "get": {
        "operationId": "getProjectConversations",
        "tags": [
          "Projects"
        ],
        "description": "All chats in a project the caller can read. Chats authored by others require `project:read-all`; without it the caller sees only their own. `readOnly` marks chats authored by someone else (viewable, never writable).\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:read`: View projects and your own chats inside them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "title": {
                        "nullable": true,
                        "type": "string"
                      },
                      "authorUserId": {
                        "type": "string"
                      },
                      "authorName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "origin": {
                        "type": "string",
                        "enum": [
                          "user",
                          "schedule_trigger",
                          "app_open"
                        ]
                      },
                      "lastMessageAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "readOnly": {
                        "type": "boolean"
                      },
                      "scheduleTriggerId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "scheduleRunId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "scheduleName": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "authorUserId",
                      "authorName",
                      "origin",
                      "lastMessageAt",
                      "createdAt",
                      "readOnly",
                      "scheduleTriggerId",
                      "scheduleRunId",
                      "scheduleName"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:read"
          ]
        }
      }
    },
    "/api/projects/{id}/pin": {
      "put": {
        "operationId": "pinProject",
        "tags": [
          "Projects"
        ],
        "description": "Pin a project to the current user's sidebar. Personal — does not affect other members. Any user who can read the project may pin it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:read`: View projects and your own chats inside them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:read"
          ]
        }
      },
      "delete": {
        "operationId": "unpinProject",
        "tags": [
          "Projects"
        ],
        "description": "Remove the current user's pin on a project. Idempotent; allowed even if the project was since unshared from the user.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`project:read`: View projects and your own chats inside them",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "project:read"
          ]
        }
      }
    },
    "/api/schedule-triggers": {
      "get": {
        "operationId": "getScheduleTriggers",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "List scheduled agent triggers\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:read`: View scheduled tasks and their run history",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "enabled",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "name",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "actorUserIds",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "agentIds",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "projectId",
            "required": false
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "showAll",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "agentId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "projectId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "messageTemplate": {
                            "type": "string"
                          },
                          "cronExpression": {
                            "type": "string"
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "actorUserId": {
                            "type": "string"
                          },
                          "lastExecutedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "actor": {
                            "nullable": true,
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "nullable": true,
                                "type": "string"
                              },
                              "email": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "email"
                            ],
                            "additionalProperties": false
                          },
                          "agent": {
                            "nullable": true,
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "nullable": true,
                                "type": "string"
                              },
                              "agentType": {
                                "nullable": true,
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "agentType"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "name",
                          "agentId",
                          "projectId",
                          "messageTemplate",
                          "cronExpression",
                          "timezone",
                          "enabled",
                          "actorUserId",
                          "lastExecutedAt",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:read"
          ]
        }
      },
      "post": {
        "operationId": "createScheduleTrigger",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Create a scheduled agent trigger\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:create`: Create new scheduled tasks and trigger runs",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "agentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "projectId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "cronExpression": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timezone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "messageTemplate": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "name",
                  "projectId",
                  "cronExpression",
                  "timezone",
                  "messageTemplate"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "messageTemplate": {
                      "type": "string"
                    },
                    "cronExpression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "actorUserId": {
                      "type": "string"
                    },
                    "lastExecutedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actor": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "email": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "agentType"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "agentId",
                    "projectId",
                    "messageTemplate",
                    "cronExpression",
                    "timezone",
                    "enabled",
                    "actorUserId",
                    "lastExecutedAt",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:create"
          ]
        }
      }
    },
    "/api/schedule-triggers/{id}": {
      "get": {
        "operationId": "getScheduleTrigger",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Get a scheduled agent trigger\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:read`: View scheduled tasks and their run history",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "messageTemplate": {
                      "type": "string"
                    },
                    "cronExpression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "actorUserId": {
                      "type": "string"
                    },
                    "lastExecutedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actor": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "email": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "agentType"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "agentId",
                    "projectId",
                    "messageTemplate",
                    "cronExpression",
                    "timezone",
                    "enabled",
                    "actorUserId",
                    "lastExecutedAt",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:read"
          ]
        }
      },
      "put": {
        "operationId": "updateScheduleTrigger",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Update a scheduled agent trigger\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:update`: Modify scheduled task configuration",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "agentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "projectId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "cronExpression": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timezone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "messageTemplate": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "messageTemplate": {
                      "type": "string"
                    },
                    "cronExpression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "actorUserId": {
                      "type": "string"
                    },
                    "lastExecutedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actor": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "email": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "agentType"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "agentId",
                    "projectId",
                    "messageTemplate",
                    "cronExpression",
                    "timezone",
                    "enabled",
                    "actorUserId",
                    "lastExecutedAt",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteScheduleTrigger",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Delete a scheduled agent trigger\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:delete`: Delete scheduled tasks",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:delete"
          ]
        }
      }
    },
    "/api/schedule-triggers/{id}/enable": {
      "post": {
        "operationId": "enableScheduleTrigger",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Enable a scheduled agent trigger\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:update`: Modify scheduled task configuration",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "messageTemplate": {
                      "type": "string"
                    },
                    "cronExpression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "actorUserId": {
                      "type": "string"
                    },
                    "lastExecutedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actor": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "email": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "agentType"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "agentId",
                    "projectId",
                    "messageTemplate",
                    "cronExpression",
                    "timezone",
                    "enabled",
                    "actorUserId",
                    "lastExecutedAt",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:update"
          ]
        }
      }
    },
    "/api/schedule-triggers/{id}/disable": {
      "post": {
        "operationId": "disableScheduleTrigger",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Disable a scheduled agent trigger\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:update`: Modify scheduled task configuration",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "messageTemplate": {
                      "type": "string"
                    },
                    "cronExpression": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "actorUserId": {
                      "type": "string"
                    },
                    "lastExecutedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actor": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "email": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email"
                      ],
                      "additionalProperties": false
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "agentType"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "agentId",
                    "projectId",
                    "messageTemplate",
                    "cronExpression",
                    "timezone",
                    "enabled",
                    "actorUserId",
                    "lastExecutedAt",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:update"
          ]
        }
      }
    },
    "/api/schedule-triggers/{id}/run-now": {
      "post": {
        "operationId": "runScheduleTriggerNow",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Run a scheduled agent trigger immediately\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:create`: Create new scheduled tasks and trigger runs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "triggerId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "runKind": {
                      "type": "string",
                      "enum": [
                        "due",
                        "manual"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "success",
                        "failed"
                      ]
                    },
                    "initiatedByUserId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatConversationId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "startedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "completedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "error": {
                      "nullable": true,
                      "type": "string"
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "triggerId",
                    "runKind",
                    "status",
                    "initiatedByUserId",
                    "chatConversationId",
                    "startedAt",
                    "completedAt",
                    "error",
                    "artifact",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:create"
          ]
        }
      }
    },
    "/api/schedule-triggers/{id}/runs": {
      "get": {
        "operationId": "getScheduleTriggerRuns",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "List runs for a scheduled agent trigger\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:read`: View scheduled tasks and their run history",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "running",
                "success",
                "failed"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "triggerId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "runKind": {
                            "type": "string",
                            "enum": [
                              "due",
                              "manual"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "success",
                              "failed"
                            ]
                          },
                          "initiatedByUserId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "chatConversationId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "startedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "completedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "error": {
                            "nullable": true,
                            "type": "string"
                          },
                          "artifact": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "triggerId",
                          "runKind",
                          "status",
                          "initiatedByUserId",
                          "chatConversationId",
                          "startedAt",
                          "completedAt",
                          "error",
                          "artifact",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:read"
          ]
        }
      }
    },
    "/api/schedule-triggers/{id}/runs/{runId}": {
      "get": {
        "operationId": "getScheduleTriggerRun",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Get a single run for a scheduled agent trigger\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:read`: View scheduled tasks and their run history",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "runId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "triggerId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "runKind": {
                      "type": "string",
                      "enum": [
                        "due",
                        "manual"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "success",
                        "failed"
                      ]
                    },
                    "initiatedByUserId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "chatConversationId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "startedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "completedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "error": {
                      "nullable": true,
                      "type": "string"
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "triggerId",
                    "runKind",
                    "status",
                    "initiatedByUserId",
                    "chatConversationId",
                    "startedAt",
                    "completedAt",
                    "error",
                    "artifact",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:read"
          ]
        }
      }
    },
    "/api/schedule-triggers/{id}/runs/{runId}/conversation": {
      "post": {
        "operationId": "createScheduleTriggerRunConversation",
        "tags": [
          "Schedule Triggers"
        ],
        "description": "Create or return the chat conversation linked to a schedule run\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`scheduledTask:create`: Create new scheduled tasks and trigger runs",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "runId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "agentId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatApiKeyId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "nullable": true,
                      "type": "string"
                    },
                    "selectedModel": {
                      "type": "string"
                    },
                    "selectedProvider": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "openai",
                        "gemini",
                        "anthropic",
                        "bedrock",
                        "cohere",
                        "cerebras",
                        "mistral",
                        "perplexity",
                        "groq",
                        "xai",
                        "openrouter",
                        "vllm",
                        "ollama",
                        "ollama-native",
                        "zhipuai",
                        "deepseek",
                        "minimax",
                        "kimi",
                        "azure",
                        "github-copilot",
                        "microsoft-365-copilot",
                        "archestra"
                      ]
                    },
                    "modelId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "thinkingEffort": {
                      "nullable": true,
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high"
                      ]
                    },
                    "hasCustomToolSelection": {
                      "type": "boolean"
                    },
                    "hooksDebugEnabled": {
                      "type": "boolean"
                    },
                    "todoList": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "artifact": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "user",
                        "schedule_trigger",
                        "app_open"
                      ]
                    },
                    "titleIsPlaceholder": {
                      "type": "boolean"
                    },
                    "incognito": {
                      "type": "boolean"
                    },
                    "pinnedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "contentLocked": {
                      "type": "boolean"
                    },
                    "agent": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "systemPrompt": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentType": {
                          "type": "string",
                          "enum": [
                            "profile",
                            "mcp_gateway",
                            "llm_proxy",
                            "agent"
                          ]
                        },
                        "toolExposureMode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "search_and_run_only"
                          ]
                        },
                        "llmApiKeyId": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "systemPrompt",
                        "agentType",
                        "toolExposureMode",
                        "llmApiKeyId"
                      ],
                      "additionalProperties": false
                    },
                    "share": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "team",
                            "user"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "visibility"
                      ],
                      "additionalProperties": false
                    },
                    "projectName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "projectIcon": {
                      "nullable": true,
                      "type": "string"
                    },
                    "unread": {
                      "type": "boolean"
                    },
                    "messages": {
                      "type": "array",
                      "items": {}
                    },
                    "chatErrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "error": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "rate_limit",
                                  "usage_limit_exceeded",
                                  "authentication",
                                  "permission_denied",
                                  "invalid_request",
                                  "provider_insufficient_balance",
                                  "not_found",
                                  "context_too_long",
                                  "request_too_large",
                                  "request_exceeds_rate_limit",
                                  "content_filtered",
                                  "server_error",
                                  "network_error",
                                  "empty_response",
                                  "incomplete_tool_call",
                                  "tool_call_output_truncated",
                                  "provider_auth_required",
                                  "tools_unsupported",
                                  "aborted",
                                  "unknown"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "isRetryable": {
                                "type": "boolean"
                              },
                              "sessionId": {
                                "type": "string"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "spanId": {
                                "type": "string"
                              },
                              "usageLimitExceeded": {
                                "type": "boolean"
                              },
                              "usageLimitEntityType": {
                                "type": "string"
                              },
                              "authAction": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "providerLabel": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "provider",
                                  "providerLabel"
                                ],
                                "additionalProperties": false
                              },
                              "originalError": {
                                "type": "object",
                                "properties": {
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "openai",
                                      "gemini",
                                      "anthropic",
                                      "bedrock",
                                      "cohere",
                                      "cerebras",
                                      "mistral",
                                      "perplexity",
                                      "groq",
                                      "xai",
                                      "openrouter",
                                      "vllm",
                                      "ollama",
                                      "ollama-native",
                                      "zhipuai",
                                      "deepseek",
                                      "minimax",
                                      "kimi",
                                      "azure",
                                      "github-copilot",
                                      "microsoft-365-copilot",
                                      "archestra"
                                    ]
                                  },
                                  "status": {
                                    "type": "number"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string"
                                  },
                                  "raw": {}
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "isRetryable"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "error",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "compactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "conversationId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "compactedThroughMessageId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "auto",
                              "manual"
                            ]
                          },
                          "provider": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "originalTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "compactedTokenEstimate": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "summary",
                          "compactedThroughMessageId",
                          "trigger",
                          "provider",
                          "model",
                          "originalTokenEstimate",
                          "compactedTokenEstimate",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "agentId",
                    "chatApiKeyId",
                    "title",
                    "selectedModel",
                    "selectedProvider",
                    "modelId",
                    "thinkingEffort",
                    "hasCustomToolSelection",
                    "hooksDebugEnabled",
                    "todoList",
                    "artifact",
                    "projectId",
                    "origin",
                    "titleIsPlaceholder",
                    "incognito",
                    "pinnedAt",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "agent",
                    "share",
                    "messages",
                    "chatErrors",
                    "compactions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "scheduledTask:create"
          ]
        }
      }
    },
    "/api/secrets/type": {
      "get": {
        "operationId": "getSecretsType",
        "tags": [
          "Secrets"
        ],
        "description": "Get the secrets manager type and configuration details (for Vault)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`secret:read`: View secrets manager configuration",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "DB",
                        "Vault",
                        "BYOS_VAULT"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "type",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "secret:read"
          ]
        }
      }
    },
    "/api/secrets/{id}": {
      "get": {
        "operationId": "getSecret",
        "tags": [
          "Secrets"
        ],
        "description": "Get a secret by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`secret:read`: View secrets manager configuration",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 256
                    },
                    "secret": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "isVault": {
                      "type": "boolean"
                    },
                    "isByosVault": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "secret",
                    "isVault",
                    "isByosVault",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "secret:read"
          ]
        }
      }
    },
    "/api/secrets/check-connectivity": {
      "post": {
        "operationId": "checkSecretsConnectivity",
        "tags": [
          "Secrets"
        ],
        "description": "Check connectivity to the secrets storage and return secret count.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`secret:update`: Modify secrets manager settings and test connectivity",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "secretCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "secretCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "secret:update"
          ]
        }
      }
    },
    "/api/service-accounts": {
      "get": {
        "operationId": "getServiceAccounts",
        "tags": [
          "Service Accounts"
        ],
        "description": "List organization service accounts\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`serviceAccount:read`: View service accounts",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "disabled": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "tokenCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "name",
                      "role",
                      "disabled",
                      "createdAt",
                      "updatedAt",
                      "tokenCount"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "serviceAccount:read"
          ]
        }
      },
      "post": {
        "operationId": "createServiceAccount",
        "tags": [
          "Service Accounts"
        ],
        "description": "Create an organization service account\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`serviceAccount:create`: Create service accounts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "name",
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tokenCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "tokenStart": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "expiresAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "tokenStart",
                          "disabled",
                          "lastUsedAt",
                          "expiresAt",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "role",
                    "disabled",
                    "createdAt",
                    "updatedAt",
                    "tokenCount",
                    "tokens"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "serviceAccount:create"
          ]
        }
      }
    },
    "/api/service-accounts/{id}": {
      "get": {
        "operationId": "getServiceAccount",
        "tags": [
          "Service Accounts"
        ],
        "description": "Get one organization service account\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`serviceAccount:read`: View service accounts",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tokenCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "tokenStart": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "expiresAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "tokenStart",
                          "disabled",
                          "lastUsedAt",
                          "expiresAt",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "role",
                    "disabled",
                    "createdAt",
                    "updatedAt",
                    "tokenCount",
                    "tokens"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "serviceAccount:read"
          ]
        }
      },
      "patch": {
        "operationId": "updateServiceAccount",
        "tags": [
          "Service Accounts"
        ],
        "description": "Update an organization service account\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`serviceAccount:update`: Modify service accounts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "disabled": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tokenCount": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "tokenStart": {
                            "type": "string"
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "expiresAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "tokenStart",
                          "disabled",
                          "lastUsedAt",
                          "expiresAt",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "role",
                    "disabled",
                    "createdAt",
                    "updatedAt",
                    "tokenCount",
                    "tokens"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "serviceAccount:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteServiceAccount",
        "tags": [
          "Service Accounts"
        ],
        "description": "Delete an organization service account\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`serviceAccount:delete`: Delete service accounts",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "serviceAccount:delete"
          ]
        }
      }
    },
    "/api/service-accounts/{id}/tokens": {
      "post": {
        "operationId": "createServiceAccountToken",
        "tags": [
          "Service Accounts"
        ],
        "description": "Create a token for an organization service account\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`serviceAccount:update`: Modify service accounts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "expiresIn": {
                    "nullable": true,
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tokenStart": {
                      "type": "string"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "tokenStart",
                    "disabled",
                    "lastUsedAt",
                    "expiresAt",
                    "createdAt",
                    "token"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "serviceAccount:update"
          ]
        }
      }
    },
    "/api/service-accounts/{id}/tokens/{tokenId}": {
      "delete": {
        "operationId": "deleteServiceAccountToken",
        "tags": [
          "Service Accounts"
        ],
        "description": "Delete one service account token\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`serviceAccount:update`: Modify service accounts",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "tokenId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "serviceAccount:update"
          ]
        }
      },
      "patch": {
        "operationId": "updateServiceAccountToken",
        "tags": [
          "Service Accounts"
        ],
        "description": "Update one service account token\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`serviceAccount:update`: Modify service accounts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "expiresAt": {
                    "nullable": true
                  },
                  "disabled": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "tokenId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tokenStart": {
                      "type": "string"
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "tokenStart",
                    "disabled",
                    "lastUsedAt",
                    "expiresAt",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "serviceAccount:update"
          ]
        }
      }
    },
    "/api/site-notification": {
      "get": {
        "operationId": "getSiteNotification",
        "tags": [
          "Site Notification"
        ],
        "description": "Get the active site notification for the current organization\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`siteNotification:read`: View site-wide notifications",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "isActive": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "content",
                    "expiresAt",
                    "createdAt",
                    "isActive"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "siteNotification:read"
          ]
        }
      },
      "post": {
        "operationId": "createSiteNotification",
        "tags": [
          "Site Notification"
        ],
        "description": "Create a new site notification\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`siteNotification:create`: Create new site notifications",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "isActive": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "content",
                    "expiresAt",
                    "createdAt",
                    "isActive"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "siteNotification:create"
          ]
        }
      }
    },
    "/api/site-notification/settings": {
      "get": {
        "operationId": "getSiteNotificationSettings",
        "tags": [
          "Site Notification"
        ],
        "description": "Get the latest site notification for settings management\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`siteNotification:read`: View site-wide notifications",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "isActive": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "content",
                    "expiresAt",
                    "createdAt",
                    "isActive"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "siteNotification:read"
          ]
        }
      }
    },
    "/api/site-notification/{id}": {
      "put": {
        "operationId": "updateSiteNotification",
        "tags": [
          "Site Notification"
        ],
        "description": "Update an existing site notification\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`siteNotification:update`: Modify site notifications",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1
                  },
                  "expiresAt": {
                    "nullable": true,
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "isActive": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "content",
                    "expiresAt",
                    "createdAt",
                    "isActive"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "siteNotification:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteSiteNotification",
        "tags": [
          "Site Notification"
        ],
        "description": "Delete a site notification\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`siteNotification:delete`: Delete site notifications",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "siteNotification:delete"
          ]
        }
      }
    },
    "/api/skills": {
      "get": {
        "operationId": "getSkills",
        "tags": [
          "Skills"
        ],
        "description": "List all agent skills for the organization\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "sourceRepo",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "forAgentId",
            "required": false,
            "description": "Restrict results to skills visible from this agent's environment (skills with no environment assignments and built-in skills are visible everywhere)."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "personal",
                "team",
                "org"
              ]
            },
            "in": "query",
            "name": "scope",
            "required": false,
            "description": "Filter by visibility scope: personal, team, or org."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "teamIds",
            "required": false,
            "description": "Team IDs (comma-separated); only used when scope=team."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "authorIds",
            "required": false,
            "description": "Author user IDs (comma-separated). Admin-only; used with scope=personal."
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "excludeAuthorIds",
            "required": false,
            "description": "Exclude author user IDs (comma-separated). Admin-only; used with scope=personal."
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "excludeOtherPersonalSkills",
            "required": false,
            "description": "Hide personal skills owned by other users. Admin-only; no-op for non-admins."
          },
          {
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "deleted"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Which skills to list: active (default) or the soft-deleted trash. `deleted` is restricted to admins and team-admins."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "usageCount",
                "lastUsedAt",
                "name",
                "createdAt"
              ]
            },
            "in": "query",
            "name": "sortBy",
            "required": false
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "authorId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "digest": {
                            "nullable": true,
                            "type": "string"
                          },
                          "latestVersion": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "license": {
                            "nullable": true,
                            "type": "string"
                          },
                          "compatibility": {
                            "nullable": true,
                            "type": "string"
                          },
                          "allowedTools": {
                            "nullable": true,
                            "type": "string"
                          },
                          "agentName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "templated": {
                            "type": "boolean"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "sourceType": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "github",
                              "built_in"
                            ]
                          },
                          "sourceRef": {
                            "nullable": true,
                            "type": "string"
                          },
                          "sourceCommit": {
                            "nullable": true,
                            "type": "string"
                          },
                          "githubSyncInterval": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "15m",
                                  "1h",
                                  "1d"
                                ]
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          "githubSyncRef": {
                            "nullable": true,
                            "type": "string"
                          },
                          "githubAppConfigId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "githubPatId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "lastSyncedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastSyncError": {
                            "nullable": true,
                            "type": "string"
                          },
                          "usageCount": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "fileCount": {
                            "type": "number"
                          },
                          "teams": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "email": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "email"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "environments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "authorName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "usageUserCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "authorId",
                          "scope",
                          "name",
                          "description",
                          "content",
                          "digest",
                          "latestVersion",
                          "license",
                          "compatibility",
                          "allowedTools",
                          "agentName",
                          "templated",
                          "metadata",
                          "sourceType",
                          "sourceRef",
                          "sourceCommit",
                          "githubSyncInterval",
                          "githubSyncRef",
                          "githubAppConfigId",
                          "githubPatId",
                          "lastSyncedAt",
                          "lastSyncError",
                          "usageCount",
                          "lastUsedAt",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "fileCount",
                          "teams",
                          "users",
                          "environments",
                          "authorName",
                          "usageUserCount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      },
      "post": {
        "operationId": "createSkill",
        "tags": [
          "Skills"
        ],
        "description": "Create a skill from a raw SKILL.md and resource files\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:create`: Create new agent skills",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10485760,
                    "description": "A complete SKILL.md manifest: a YAML frontmatter block with `name` and `description` (and optional `license`, `compatibility`, `allowed-tools`, `agent`, `templated`, `metadata`), followed by the Markdown instruction body. Set `templated: true` to render the body through Handlebars (e.g. `{{user.name}}`) at activation. `allowed-tools` is a space-separated list of tools the skill is pre-approved to use. `agent` names an agent the skill runs in — when set, activating the skill delegates it to that agent instead of loading the instructions into the caller's context."
                  },
                  "files": {
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Resource path, e.g. references/API.md or scripts/run.py"
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 13981016,
                          "description": "Text content of the file"
                        },
                        "encoding": {
                          "type": "string",
                          "enum": [
                            "utf8",
                            "base64"
                          ]
                        }
                      },
                      "required": [
                        "path",
                        "content"
                      ]
                    }
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "userIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "environmentIds": {
                    "description": "Environments the skill is restricted to. Empty (or omitted on create) makes the skill available to agents in every environment; otherwise only agents in one of the listed environments see it.",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "allowedTools": {
                    "description": "Tools the skill expects, overriding the SKILL.md `allowed-tools` frontmatter. Omit to use the frontmatter; pass [] to clear.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "digest": {
                      "nullable": true,
                      "type": "string"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "license": {
                      "nullable": true,
                      "type": "string"
                    },
                    "compatibility": {
                      "nullable": true,
                      "type": "string"
                    },
                    "allowedTools": {
                      "nullable": true,
                      "type": "string"
                    },
                    "agentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templated": {
                      "type": "boolean"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "sourceType": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "github",
                        "built_in"
                      ]
                    },
                    "sourceRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "sourceCommit": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubSyncInterval": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "15m",
                            "1h",
                            "1d"
                          ]
                        },
                        {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            null
                          ]
                        }
                      ]
                    },
                    "githubSyncRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubAppConfigId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "githubPatId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "lastSyncedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usageCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "skillId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "path": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "utf8",
                              "base64"
                            ]
                          },
                          "digest": {
                            "nullable": true,
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reference",
                              "script",
                              "asset"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "skillId",
                          "path",
                          "content",
                          "encoding",
                          "digest",
                          "kind",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "environments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "description",
                    "content",
                    "digest",
                    "latestVersion",
                    "license",
                    "compatibility",
                    "allowedTools",
                    "agentName",
                    "templated",
                    "metadata",
                    "sourceType",
                    "sourceRef",
                    "sourceCommit",
                    "githubSyncInterval",
                    "githubSyncRef",
                    "githubAppConfigId",
                    "githubPatId",
                    "lastSyncedAt",
                    "lastSyncError",
                    "usageCount",
                    "lastUsedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "files",
                    "teams",
                    "users",
                    "environments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:create"
          ]
        }
      }
    },
    "/api/agents/{id}/convert-to-skill": {
      "post": {
        "operationId": "convertAgentToSkill",
        "tags": [
          "Skills"
        ],
        "description": "Convert an internal agent into a new Agent Skill. The skill inherits the agent's scope. The source agent is left intact unless deleteAgent is set.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agent:read`: View and list agents\n`skill:create`: Create new agent skills",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                  },
                  "deleteAgent": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "skill": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "authorId": {
                          "nullable": true,
                          "type": "string"
                        },
                        "scope": {
                          "type": "string",
                          "enum": [
                            "personal",
                            "team",
                            "org"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        },
                        "digest": {
                          "nullable": true,
                          "type": "string"
                        },
                        "latestVersion": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "license": {
                          "nullable": true,
                          "type": "string"
                        },
                        "compatibility": {
                          "nullable": true,
                          "type": "string"
                        },
                        "allowedTools": {
                          "nullable": true,
                          "type": "string"
                        },
                        "agentName": {
                          "nullable": true,
                          "type": "string"
                        },
                        "templated": {
                          "type": "boolean"
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "sourceType": {
                          "type": "string",
                          "enum": [
                            "manual",
                            "github",
                            "built_in"
                          ]
                        },
                        "sourceRef": {
                          "nullable": true,
                          "type": "string"
                        },
                        "sourceCommit": {
                          "nullable": true,
                          "type": "string"
                        },
                        "githubSyncInterval": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "15m",
                                "1h",
                                "1d"
                              ]
                            },
                            {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                null
                              ]
                            }
                          ]
                        },
                        "githubSyncRef": {
                          "nullable": true,
                          "type": "string"
                        },
                        "githubAppConfigId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "githubPatId": {
                          "nullable": true,
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "lastSyncedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastSyncError": {
                          "nullable": true,
                          "type": "string"
                        },
                        "usageCount": {
                          "type": "integer",
                          "minimum": -2147483648,
                          "maximum": 2147483647
                        },
                        "lastUsedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "deletedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "files": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "skillId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "path": {
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              },
                              "encoding": {
                                "type": "string",
                                "enum": [
                                  "utf8",
                                  "base64"
                                ]
                              },
                              "digest": {
                                "nullable": true,
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "reference",
                                  "script",
                                  "asset"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "skillId",
                              "path",
                              "content",
                              "encoding",
                              "digest",
                              "kind",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "teams": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "users": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "email"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "environments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "organizationId",
                        "authorId",
                        "scope",
                        "name",
                        "description",
                        "content",
                        "digest",
                        "latestVersion",
                        "license",
                        "compatibility",
                        "allowedTools",
                        "agentName",
                        "templated",
                        "metadata",
                        "sourceType",
                        "sourceRef",
                        "sourceCommit",
                        "githubSyncInterval",
                        "githubSyncRef",
                        "githubAppConfigId",
                        "githubPatId",
                        "lastSyncedAt",
                        "lastSyncError",
                        "usageCount",
                        "lastUsedAt",
                        "createdAt",
                        "updatedAt",
                        "deletedAt",
                        "files",
                        "teams",
                        "users",
                        "environments"
                      ],
                      "additionalProperties": false
                    },
                    "report": {
                      "type": "object",
                      "properties": {
                        "carried": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "detail": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "detail"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "annotated": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "detail": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field",
                              "detail"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "carried",
                        "annotated"
                      ],
                      "additionalProperties": false
                    },
                    "deletedAgent": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "skill",
                    "report",
                    "deletedAgent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agent:read",
            "skill:create"
          ]
        }
      }
    },
    "/api/agents/{id}/suggest-skill-description": {
      "post": {
        "operationId": "suggestSkillDescription",
        "tags": [
          "Skills"
        ],
        "description": "Suggest a skill description for an agent using an LLM, for the convert-to-skill flow. Does not modify the agent or create a skill.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`agent:read`: View and list agents\n`chat:read`: View and access chat conversations\n`skill:create`: Create new agent skills",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "description"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "agent:read",
            "chat:read",
            "skill:create"
          ]
        }
      }
    },
    "/api/skills/{id}": {
      "get": {
        "operationId": "getSkill",
        "tags": [
          "Skills"
        ],
        "description": "Get a skill with its resource files\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "digest": {
                      "nullable": true,
                      "type": "string"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "license": {
                      "nullable": true,
                      "type": "string"
                    },
                    "compatibility": {
                      "nullable": true,
                      "type": "string"
                    },
                    "allowedTools": {
                      "nullable": true,
                      "type": "string"
                    },
                    "agentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templated": {
                      "type": "boolean"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "sourceType": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "github",
                        "built_in"
                      ]
                    },
                    "sourceRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "sourceCommit": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubSyncInterval": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "15m",
                            "1h",
                            "1d"
                          ]
                        },
                        {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            null
                          ]
                        }
                      ]
                    },
                    "githubSyncRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubAppConfigId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "githubPatId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "lastSyncedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usageCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "skillId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "path": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "utf8",
                              "base64"
                            ]
                          },
                          "digest": {
                            "nullable": true,
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reference",
                              "script",
                              "asset"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "skillId",
                          "path",
                          "content",
                          "encoding",
                          "digest",
                          "kind",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "environments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "description",
                    "content",
                    "digest",
                    "latestVersion",
                    "license",
                    "compatibility",
                    "allowedTools",
                    "agentName",
                    "templated",
                    "metadata",
                    "sourceType",
                    "sourceRef",
                    "sourceCommit",
                    "githubSyncInterval",
                    "githubSyncRef",
                    "githubAppConfigId",
                    "githubPatId",
                    "lastSyncedAt",
                    "lastSyncError",
                    "usageCount",
                    "lastUsedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "files",
                    "teams",
                    "users",
                    "environments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      },
      "put": {
        "operationId": "updateSkill",
        "tags": [
          "Skills"
        ],
        "description": "Update a skill's SKILL.md, resource files, and scope\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:update`: Modify agent skills and their team assignments",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10485760,
                    "description": "A complete SKILL.md manifest: a YAML frontmatter block with `name` and `description` (and optional `license`, `compatibility`, `allowed-tools`, `agent`, `templated`, `metadata`), followed by the Markdown instruction body. Set `templated: true` to render the body through Handlebars (e.g. `{{user.name}}`) at activation. `allowed-tools` is a space-separated list of tools the skill is pre-approved to use. `agent` names an agent the skill runs in — when set, activating the skill delegates it to that agent instead of loading the instructions into the caller's context."
                  },
                  "files": {
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Resource path, e.g. references/API.md or scripts/run.py"
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 13981016,
                          "description": "Text content of the file"
                        },
                        "encoding": {
                          "type": "string",
                          "enum": [
                            "utf8",
                            "base64"
                          ]
                        }
                      },
                      "required": [
                        "path",
                        "content"
                      ]
                    }
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "userIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "environmentIds": {
                    "description": "Environments the skill is restricted to. Empty (or omitted on create) makes the skill available to agents in every environment; otherwise only agents in one of the listed environments see it.",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "allowedTools": {
                    "description": "Tools the skill expects, overriding the SKILL.md `allowed-tools` frontmatter. Omit to use the frontmatter; pass [] to clear.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "baseVersion": {
                    "description": "The skill's `latestVersion` when this edit was composed. Rejected with 409 if the skill has moved past it. Omit only when the payload owes nothing to a prior read of the skill.",
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "digest": {
                      "nullable": true,
                      "type": "string"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "license": {
                      "nullable": true,
                      "type": "string"
                    },
                    "compatibility": {
                      "nullable": true,
                      "type": "string"
                    },
                    "allowedTools": {
                      "nullable": true,
                      "type": "string"
                    },
                    "agentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templated": {
                      "type": "boolean"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "sourceType": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "github",
                        "built_in"
                      ]
                    },
                    "sourceRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "sourceCommit": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubSyncInterval": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "15m",
                            "1h",
                            "1d"
                          ]
                        },
                        {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            null
                          ]
                        }
                      ]
                    },
                    "githubSyncRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubAppConfigId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "githubPatId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "lastSyncedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usageCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "skillId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "path": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "utf8",
                              "base64"
                            ]
                          },
                          "digest": {
                            "nullable": true,
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reference",
                              "script",
                              "asset"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "skillId",
                          "path",
                          "content",
                          "encoding",
                          "digest",
                          "kind",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "environments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "description",
                    "content",
                    "digest",
                    "latestVersion",
                    "license",
                    "compatibility",
                    "allowedTools",
                    "agentName",
                    "templated",
                    "metadata",
                    "sourceType",
                    "sourceRef",
                    "sourceCommit",
                    "githubSyncInterval",
                    "githubSyncRef",
                    "githubAppConfigId",
                    "githubPatId",
                    "lastSyncedAt",
                    "lastSyncError",
                    "usageCount",
                    "lastUsedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "files",
                    "teams",
                    "users",
                    "environments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteSkill",
        "tags": [
          "Skills"
        ],
        "description": "Delete a skill and its resource files\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:delete`: Delete agent skills",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:delete"
          ]
        }
      }
    },
    "/api/skills/{id}/usage-statistics": {
      "get": {
        "operationId": "getSkillUsageStatistics",
        "tags": [
          "Skills"
        ],
        "description": "Per-user activation counts for a skill over the last 30 days\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "since": {
                      "type": "string"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "total": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "userId",
                          "name",
                          "total"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "daily": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "userId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "count": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "date",
                          "userId",
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "since",
                    "users",
                    "daily"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/skills/{id}/versions": {
      "get": {
        "operationId": "getSkillVersions",
        "tags": [
          "Skills"
        ],
        "description": "List a skill's version history, newest first, as metadata only (no SKILL.md body). Version numbers are contiguous from 1. Paginated.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "skillId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "contentHash": {
                            "type": "string"
                          },
                          "sourceCommit": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "skillId",
                          "version",
                          "contentHash",
                          "sourceCommit",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/skills/{id}/versions/{version}": {
      "get": {
        "operationId": "getSkillVersion",
        "tags": [
          "Skills"
        ],
        "description": "Get one immutable skill version: the SKILL.md body it captured plus its resource-file snapshots.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "integer",
              "exclusiveMinimum": true,
              "maximum": 2147483647
            },
            "in": "path",
            "name": "version",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "skillId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "content": {
                      "type": "string"
                    },
                    "contentHash": {
                      "type": "string"
                    },
                    "sourceCommit": {
                      "nullable": true,
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "versionId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "path": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "utf8",
                              "base64"
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reference",
                              "script",
                              "asset"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "versionId",
                          "path",
                          "content",
                          "encoding",
                          "kind",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "skillId",
                    "version",
                    "content",
                    "contentHash",
                    "sourceCommit",
                    "createdAt",
                    "files"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/skills/source-repos": {
      "get": {
        "operationId": "getSkillSourceRepos",
        "tags": [
          "Skills"
        ],
        "description": "List distinct GitHub repositories that skills in this organization were imported from\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repos": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "repos"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/skills/{id}/restore": {
      "post": {
        "operationId": "restoreSkill",
        "tags": [
          "Skills"
        ],
        "description": "Restore a soft-deleted skill\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:delete`: Delete agent skills",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "digest": {
                      "nullable": true,
                      "type": "string"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "license": {
                      "nullable": true,
                      "type": "string"
                    },
                    "compatibility": {
                      "nullable": true,
                      "type": "string"
                    },
                    "allowedTools": {
                      "nullable": true,
                      "type": "string"
                    },
                    "agentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templated": {
                      "type": "boolean"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "sourceType": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "github",
                        "built_in"
                      ]
                    },
                    "sourceRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "sourceCommit": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubSyncInterval": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "15m",
                            "1h",
                            "1d"
                          ]
                        },
                        {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            null
                          ]
                        }
                      ]
                    },
                    "githubSyncRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubAppConfigId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "githubPatId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "lastSyncedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usageCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "skillId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "path": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "utf8",
                              "base64"
                            ]
                          },
                          "digest": {
                            "nullable": true,
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reference",
                              "script",
                              "asset"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "skillId",
                          "path",
                          "content",
                          "encoding",
                          "digest",
                          "kind",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "environments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "description",
                    "content",
                    "digest",
                    "latestVersion",
                    "license",
                    "compatibility",
                    "allowedTools",
                    "agentName",
                    "templated",
                    "metadata",
                    "sourceType",
                    "sourceRef",
                    "sourceCommit",
                    "githubSyncInterval",
                    "githubSyncRef",
                    "githubAppConfigId",
                    "githubPatId",
                    "lastSyncedAt",
                    "lastSyncError",
                    "usageCount",
                    "lastUsedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "files",
                    "teams",
                    "users",
                    "environments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:delete"
          ]
        }
      }
    },
    "/api/skills/{id}/permanent": {
      "delete": {
        "operationId": "permanentlyDeleteSkill",
        "tags": [
          "Skills"
        ],
        "description": "Permanently destroy a soft-deleted skill (global admins only). Irreversible, with no grace period: every version and resource file is destroyed, along with the skill's team and user grants, environment assignments, usage events, and share links — so any public share URL for it stops working. 404 if there is no soft-deleted skill with that id in the org, which is also the answer when the skill is still live or the caller is not a global admin. 409 while a sandbox still has the skill mounted; that is retryable, but note nothing clears a mount on its own — it lasts as long as the sandbox does. Built-in skills cannot be purged: their soft-deleted row is what stops the seeder recreating them on the next restart. Restore wins a race.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nRestricted to the built-in Admin and Platform Admin roles. No permission grants it: `skill:delete` and even `skill:admin` reach the trash, not past it, and a service account never qualifies. A caller without it gets 404, not 403, so the endpoint never confirms the skill exists.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "dynamic",
          "note": "Restricted to the built-in Admin and Platform Admin roles. No permission grants it: `skill:delete` and even `skill:admin` reach the trash, not past it, and a service account never qualifies. A caller without it gets 404, not 403, so the endpoint never confirms the skill exists.",
          "permissions": []
        }
      }
    },
    "/api/skills/{id}/reset": {
      "post": {
        "operationId": "resetSkill",
        "tags": [
          "Skills"
        ],
        "description": "Reset a built-in skill to its shipped default SKILL.md and resource files. Only applies to skills with sourceType `built_in`.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:update`: Modify agent skills and their team assignments",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "digest": {
                      "nullable": true,
                      "type": "string"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "license": {
                      "nullable": true,
                      "type": "string"
                    },
                    "compatibility": {
                      "nullable": true,
                      "type": "string"
                    },
                    "allowedTools": {
                      "nullable": true,
                      "type": "string"
                    },
                    "agentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templated": {
                      "type": "boolean"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "sourceType": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "github",
                        "built_in"
                      ]
                    },
                    "sourceRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "sourceCommit": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubSyncInterval": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "15m",
                            "1h",
                            "1d"
                          ]
                        },
                        {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            null
                          ]
                        }
                      ]
                    },
                    "githubSyncRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubAppConfigId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "githubPatId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "lastSyncedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usageCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "skillId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "path": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "utf8",
                              "base64"
                            ]
                          },
                          "digest": {
                            "nullable": true,
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reference",
                              "script",
                              "asset"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "skillId",
                          "path",
                          "content",
                          "encoding",
                          "digest",
                          "kind",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "environments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "description",
                    "content",
                    "digest",
                    "latestVersion",
                    "license",
                    "compatibility",
                    "allowedTools",
                    "agentName",
                    "templated",
                    "metadata",
                    "sourceType",
                    "sourceRef",
                    "sourceCommit",
                    "githubSyncInterval",
                    "githubSyncRef",
                    "githubAppConfigId",
                    "githubPatId",
                    "lastSyncedAt",
                    "lastSyncError",
                    "usageCount",
                    "lastUsedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "files",
                    "teams",
                    "users",
                    "environments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:update"
          ]
        }
      }
    },
    "/api/skills/{id}/github-sync": {
      "patch": {
        "operationId": "updateSkillGithubSync",
        "tags": [
          "Skills"
        ],
        "description": "Manage a GitHub-synced skill: change its pull frequency, trigger an immediate pull, or disconnect it from the GitHub source (interval null) — a disconnected skill keeps its content and provenance and becomes editable in the app.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:update`: Modify agent skills and their team assignments",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "interval": {
                    "description": "New pull frequency.",
                    "type": "string",
                    "enum": [
                      "15m",
                      "1h",
                      "1d"
                    ]
                  },
                  "syncNow": {
                    "description": "Trigger an immediate pull from the source repo.",
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "disconnect": {
                    "description": "Disconnect the skill from its GitHub source: it keeps its content and becomes editable in the app.",
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "digest": {
                      "nullable": true,
                      "type": "string"
                    },
                    "latestVersion": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "license": {
                      "nullable": true,
                      "type": "string"
                    },
                    "compatibility": {
                      "nullable": true,
                      "type": "string"
                    },
                    "allowedTools": {
                      "nullable": true,
                      "type": "string"
                    },
                    "agentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templated": {
                      "type": "boolean"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "sourceType": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "github",
                        "built_in"
                      ]
                    },
                    "sourceRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "sourceCommit": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubSyncInterval": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "15m",
                            "1h",
                            "1d"
                          ]
                        },
                        {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            null
                          ]
                        }
                      ]
                    },
                    "githubSyncRef": {
                      "nullable": true,
                      "type": "string"
                    },
                    "githubAppConfigId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "githubPatId": {
                      "nullable": true,
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "lastSyncedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastSyncError": {
                      "nullable": true,
                      "type": "string"
                    },
                    "usageCount": {
                      "type": "integer",
                      "minimum": -2147483648,
                      "maximum": 2147483647
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "skillId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "path": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "utf8",
                              "base64"
                            ]
                          },
                          "digest": {
                            "nullable": true,
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reference",
                              "script",
                              "asset"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "skillId",
                          "path",
                          "content",
                          "encoding",
                          "digest",
                          "kind",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "environments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "authorId",
                    "scope",
                    "name",
                    "description",
                    "content",
                    "digest",
                    "latestVersion",
                    "license",
                    "compatibility",
                    "allowedTools",
                    "agentName",
                    "templated",
                    "metadata",
                    "sourceType",
                    "sourceRef",
                    "sourceCommit",
                    "githubSyncInterval",
                    "githubSyncRef",
                    "githubAppConfigId",
                    "githubPatId",
                    "lastSyncedAt",
                    "lastSyncError",
                    "usageCount",
                    "lastUsedAt",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "files",
                    "teams",
                    "users",
                    "environments"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:update"
          ]
        }
      }
    },
    "/api/skills/enable-defaults": {
      "post": {
        "operationId": "enableSkillToolDefaults",
        "tags": [
          "Skills"
        ],
        "description": "Enable the Agent Skill tools (`list_skills`, `load_skill`) for this organization. Sets the org-level flag and backfills the tools onto every existing agent. Idempotent.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:admin`: Full administrative control over all agent skills, bypassing team restrictions",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "agentsBackfilled": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "enabled",
                    "agentsBackfilled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:admin"
          ]
        }
      }
    },
    "/api/skills/catalog/search": {
      "get": {
        "operationId": "searchSkillCatalog",
        "tags": [
          "Skills"
        ],
        "description": "Search the crawled public-GitHub skill catalog by name, repo, path, or description. Backed by an in-memory token index; returns ranked candidates to import via the GitHub import endpoints.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "parameters": [
          {
            "schema": {
              "default": "",
              "type": "string"
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "repo": {
                            "type": "string"
                          },
                          "skillPath": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "compatibility": {
                            "nullable": true,
                            "type": "string"
                          },
                          "fileCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "repo",
                          "skillPath",
                          "name",
                          "description",
                          "compatibility",
                          "fileCount"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "totalCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "results",
                    "totalCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/skills/github/discover": {
      "post": {
        "operationId": "discoverGithubSkills",
        "tags": [
          "Skills"
        ],
        "description": "Discover skills in a GitHub repository\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repoUrl": {
                    "type": "string",
                    "minLength": 1
                  },
                  "path": {
                    "type": "string"
                  },
                  "githubToken": {
                    "type": "string"
                  },
                  "githubAppConfigId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "githubPatId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "repoUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repoUrl": {
                      "type": "string"
                    },
                    "ref": {
                      "type": "string"
                    },
                    "skills": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "skillPath": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "compatibility": {
                            "nullable": true,
                            "type": "string"
                          },
                          "allowedTools": {
                            "nullable": true,
                            "type": "string"
                          },
                          "templated": {
                            "type": "boolean"
                          },
                          "fileCount": {
                            "type": "number"
                          },
                          "exists": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "skillPath",
                          "name",
                          "description",
                          "compatibility",
                          "allowedTools",
                          "templated",
                          "fileCount",
                          "exists"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "repoUrl",
                    "ref",
                    "skills"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/skills/github/preview": {
      "post": {
        "operationId": "previewGithubSkill",
        "tags": [
          "Skills"
        ],
        "description": "Fetch a single skill's manifest and files from GitHub without persisting it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:read`: View and use agent skills within your scope (org, your teams, your own)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repoUrl": {
                    "type": "string",
                    "minLength": 1
                  },
                  "path": {
                    "type": "string"
                  },
                  "githubToken": {
                    "type": "string"
                  },
                  "githubAppConfigId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "githubPatId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "skillPath": {
                    "type": "string"
                  }
                },
                "required": [
                  "repoUrl",
                  "skillPath"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "license": {
                      "nullable": true,
                      "type": "string"
                    },
                    "compatibility": {
                      "nullable": true,
                      "type": "string"
                    },
                    "allowedTools": {
                      "nullable": true,
                      "type": "string"
                    },
                    "agentName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "templated": {
                      "type": "boolean"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "encoding": {
                            "type": "string",
                            "enum": [
                              "utf8",
                              "base64"
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reference",
                              "script",
                              "asset"
                            ]
                          }
                        },
                        "required": [
                          "path",
                          "content",
                          "encoding",
                          "kind"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "skippedFiles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Resource paths not imported: oversized, beyond the per-skill file cap, or unfetchable"
                    },
                    "sourceRef": {
                      "type": "string"
                    },
                    "sourceCommit": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "description",
                    "content",
                    "license",
                    "compatibility",
                    "allowedTools",
                    "agentName",
                    "templated",
                    "metadata",
                    "files",
                    "skippedFiles",
                    "sourceRef",
                    "sourceCommit"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:read"
          ]
        }
      }
    },
    "/api/skills/github/import": {
      "post": {
        "operationId": "importGithubSkills",
        "tags": [
          "Skills"
        ],
        "description": "Import selected skills from a GitHub repository\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:create`: Create new agent skills",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repoUrl": {
                    "type": "string",
                    "minLength": 1
                  },
                  "path": {
                    "type": "string"
                  },
                  "githubToken": {
                    "type": "string"
                  },
                  "githubAppConfigId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "githubPatId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "skillPaths": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "userIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "sync": {
                    "default": {
                      "interval": "1d"
                    },
                    "description": "Pull schedule for the imported skills. Every import is synced from the repo and read-only in the app until disconnected. Defaults to daily.",
                    "type": "object",
                    "properties": {
                      "interval": {
                        "type": "string",
                        "enum": [
                          "15m",
                          "1h",
                          "1d"
                        ]
                      }
                    },
                    "required": [
                      "interval"
                    ]
                  }
                },
                "required": [
                  "repoUrl",
                  "skillPaths"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "created": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "authorId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "digest": {
                            "nullable": true,
                            "type": "string"
                          },
                          "latestVersion": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "license": {
                            "nullable": true,
                            "type": "string"
                          },
                          "compatibility": {
                            "nullable": true,
                            "type": "string"
                          },
                          "allowedTools": {
                            "nullable": true,
                            "type": "string"
                          },
                          "agentName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "templated": {
                            "type": "boolean"
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "sourceType": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "github",
                              "built_in"
                            ]
                          },
                          "sourceRef": {
                            "nullable": true,
                            "type": "string"
                          },
                          "sourceCommit": {
                            "nullable": true,
                            "type": "string"
                          },
                          "githubSyncInterval": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "15m",
                                  "1h",
                                  "1d"
                                ]
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          "githubSyncRef": {
                            "nullable": true,
                            "type": "string"
                          },
                          "githubAppConfigId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "githubPatId": {
                            "nullable": true,
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "lastSyncedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastSyncError": {
                            "nullable": true,
                            "type": "string"
                          },
                          "usageCount": {
                            "type": "integer",
                            "minimum": -2147483648,
                            "maximum": 2147483647
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "authorId",
                          "scope",
                          "name",
                          "description",
                          "content",
                          "digest",
                          "latestVersion",
                          "license",
                          "compatibility",
                          "allowedTools",
                          "agentName",
                          "templated",
                          "metadata",
                          "sourceType",
                          "sourceRef",
                          "sourceCommit",
                          "githubSyncInterval",
                          "githubSyncRef",
                          "githubAppConfigId",
                          "githubPatId",
                          "lastSyncedAt",
                          "lastSyncError",
                          "usageCount",
                          "lastUsedAt",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "skippedFiles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "skillPath": {
                            "type": "string"
                          },
                          "files": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "skillPath",
                          "files"
                        ],
                        "additionalProperties": false
                      },
                      "description": "Per created skill, resource paths not imported: oversized, beyond the per-skill file cap, or unfetchable"
                    }
                  },
                  "required": [
                    "created",
                    "skipped",
                    "skippedFiles"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:create"
          ]
        }
      }
    },
    "/api/skill-sandbox/artifacts/{artifactId}": {
      "get": {
        "operationId": "getSkillSandboxArtifact",
        "tags": [
          "Skills"
        ],
        "description": "Stream the raw bytes of a skill sandbox artifact. Inline for known-safe raster images; download for everything else.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`sandbox:execute`: Run commands and upload/download files in code execution sandboxes",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9a-fA-F-]{36}|obj_[A-Za-z0-9_-]{1,2048})$"
            },
            "in": "path",
            "name": "artifactId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "sandbox:execute"
          ]
        }
      },
      "delete": {
        "operationId": "deleteSkillSandboxArtifact",
        "tags": [
          "Skills"
        ],
        "description": "Delete a persistent file. Allowed for the file's author, or anyone with access to the project owning the file.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`sandbox:execute`: Run commands and upload/download files in code execution sandboxes",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9a-fA-F-]{36}|obj_[A-Za-z0-9_-]{1,2048})$"
            },
            "in": "path",
            "name": "artifactId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "sandbox:execute"
          ]
        }
      }
    },
    "/api/skill-sandbox/artifacts/{artifactId}/content": {
      "put": {
        "operationId": "updateSkillSandboxArtifactContent",
        "tags": [
          "Skills"
        ],
        "description": "Overwrite the full text content of a row-backed Markdown/plain-text file. Allowed for the file's author, or anyone with access to the project owning the file.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`sandbox:execute`: Run commands and upload/download files in code execution sandboxes",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "maxLength": 1000000
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "artifactId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "fileId": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "fileId",
                    "filename",
                    "mimeType",
                    "sizeBytes"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "sandbox:execute"
          ]
        }
      }
    },
    "/api/skill-sandbox/conversations/{conversationId}/artifacts": {
      "get": {
        "operationId": "getSkillSandboxConversationArtifacts",
        "tags": [
          "Skills"
        ],
        "description": "List the artifact files produced in a conversation's sandbox.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`sandbox:execute`: Run commands and upload/download files in code execution sandboxes",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "conversationId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "downloadRef": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "mimeType": {
                        "type": "string"
                      },
                      "sizeBytes": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "downloadable": {
                        "type": "boolean"
                      },
                      "projectId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "projectName": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "downloadRef",
                      "filename",
                      "mimeType",
                      "sizeBytes",
                      "createdAt",
                      "downloadable",
                      "projectId",
                      "projectName"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "sandbox:execute"
          ]
        }
      }
    },
    "/api/skill-share-links": {
      "get": {
        "operationId": "getSkillShareLinks",
        "tags": [
          "Skills"
        ],
        "description": "List skill share links for the organization, optionally filtered by skill\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:admin`: Full administrative control over all agent skills, bypassing team restrictions",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "skillId",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "createdByUserId": {
                            "type": "string"
                          },
                          "tokenStart": {
                            "type": "string",
                            "maxLength": 22
                          },
                          "name": {
                            "nullable": true,
                            "type": "string"
                          },
                          "marketplaceName": {
                            "type": "string"
                          },
                          "expiresAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "revokedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "expired",
                              "revoked"
                            ]
                          },
                          "skills": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "description"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "createdByUserId",
                          "tokenStart",
                          "name",
                          "marketplaceName",
                          "expiresAt",
                          "revokedAt",
                          "lastUsedAt",
                          "createdAt",
                          "updatedAt",
                          "status",
                          "skills"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "links"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:admin"
          ]
        }
      },
      "post": {
        "operationId": "createSkillShareLink",
        "tags": [
          "Skills"
        ],
        "description": "Create a share link exposing one or more skills via the public marketplace endpoint. The raw token is returned exactly once.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:admin`: Full administrative control over all agent skills, bypassing team restrictions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "skillIds": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "expiresAt": {
                    "nullable": true,
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  }
                },
                "required": [
                  "skillIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "link": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "createdByUserId": {
                          "type": "string"
                        },
                        "tokenStart": {
                          "type": "string",
                          "maxLength": 22
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "marketplaceName": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "revokedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastUsedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "expired",
                            "revoked"
                          ]
                        },
                        "skills": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "description"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "organizationId",
                        "createdByUserId",
                        "tokenStart",
                        "name",
                        "marketplaceName",
                        "expiresAt",
                        "revokedAt",
                        "lastUsedAt",
                        "createdAt",
                        "updatedAt",
                        "status",
                        "skills"
                      ],
                      "additionalProperties": false
                    },
                    "rawToken": {
                      "type": "string"
                    },
                    "cloneUrl": {
                      "type": "string"
                    },
                    "marketplaceName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "link",
                    "rawToken",
                    "cloneUrl",
                    "marketplaceName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:admin"
          ]
        }
      }
    },
    "/api/skill-share-links/{id}/rotate": {
      "post": {
        "operationId": "rotateSkillShareLink",
        "tags": [
          "Skills"
        ],
        "description": "Rotate a share link: revoke it and create its replacement in one transaction, so no failure mode leaves both tokens live. The new raw token is returned exactly once.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:admin`: Full administrative control over all agent skills, bypassing team restrictions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "skillIds": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "expiresAt": {
                    "nullable": true,
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  }
                },
                "required": [
                  "skillIds"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "link": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "createdByUserId": {
                          "type": "string"
                        },
                        "tokenStart": {
                          "type": "string",
                          "maxLength": 22
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "marketplaceName": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "revokedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "lastUsedAt": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "expired",
                            "revoked"
                          ]
                        },
                        "skills": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "description"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "organizationId",
                        "createdByUserId",
                        "tokenStart",
                        "name",
                        "marketplaceName",
                        "expiresAt",
                        "revokedAt",
                        "lastUsedAt",
                        "createdAt",
                        "updatedAt",
                        "status",
                        "skills"
                      ],
                      "additionalProperties": false
                    },
                    "rawToken": {
                      "type": "string"
                    },
                    "cloneUrl": {
                      "type": "string"
                    },
                    "marketplaceName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "link",
                    "rawToken",
                    "cloneUrl",
                    "marketplaceName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:admin"
          ]
        }
      }
    },
    "/api/skill-share-links/{id}": {
      "delete": {
        "operationId": "revokeSkillShareLink",
        "tags": [
          "Skills"
        ],
        "description": "Revoke a skill share link. Idempotent: revoking an already-revoked link is a no-op.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`skill:admin`: Full administrative control over all agent skills, bypassing team restrictions",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "skill:admin"
          ]
        }
      }
    },
    "/api/statistics/teams": {
      "get": {
        "operationId": "getTeamStatistics",
        "tags": [
          "Statistics"
        ],
        "description": "Get team statistics\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmCost:read`: View LLM usage cost statistics and analytics",
        "parameters": [
          {
            "schema": {
              "default": "24h",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "5m",
                    "15m",
                    "30m",
                    "1h",
                    "24h",
                    "7d",
                    "30d",
                    "90d",
                    "12m",
                    "all"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^custom:[\\s\\S]{0,}_[\\s\\S]{0,}$",
                  "description": "Custom timeframe must be in format 'custom:startTime_endTime'"
                }
              ]
            },
            "in": "query",
            "name": "timeframe",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "teamId": {
                        "type": "string"
                      },
                      "teamName": {
                        "type": "string"
                      },
                      "members": {
                        "type": "number"
                      },
                      "agents": {
                        "type": "number"
                      },
                      "requests": {
                        "type": "number"
                      },
                      "inputTokens": {
                        "type": "number"
                      },
                      "outputTokens": {
                        "type": "number"
                      },
                      "cost": {
                        "type": "number"
                      },
                      "timeSeries": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "timestamp": {
                              "type": "string"
                            },
                            "value": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "timestamp",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "teamId",
                      "teamName",
                      "members",
                      "agents",
                      "requests",
                      "inputTokens",
                      "outputTokens",
                      "cost",
                      "timeSeries"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmCost:read"
          ]
        }
      }
    },
    "/api/statistics/agents": {
      "get": {
        "operationId": "getAgentStatistics",
        "tags": [
          "Statistics"
        ],
        "description": "Get agent statistics\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmCost:read`: View LLM usage cost statistics and analytics",
        "parameters": [
          {
            "schema": {
              "default": "24h",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "5m",
                    "15m",
                    "30m",
                    "1h",
                    "24h",
                    "7d",
                    "30d",
                    "90d",
                    "12m",
                    "all"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^custom:[\\s\\S]{0,}_[\\s\\S]{0,}$",
                  "description": "Custom timeframe must be in format 'custom:startTime_endTime'"
                }
              ]
            },
            "in": "query",
            "name": "timeframe",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "agentId": {
                        "type": "string"
                      },
                      "agentName": {
                        "type": "string"
                      },
                      "agentType": {
                        "type": "string"
                      },
                      "teamName": {
                        "type": "string"
                      },
                      "requests": {
                        "type": "number"
                      },
                      "inputTokens": {
                        "type": "number"
                      },
                      "outputTokens": {
                        "type": "number"
                      },
                      "cacheReadTokens": {
                        "type": "number"
                      },
                      "cost": {
                        "type": "number"
                      },
                      "timeSeries": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "timestamp": {
                              "type": "string"
                            },
                            "value": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "timestamp",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "agentId",
                      "agentName",
                      "agentType",
                      "teamName",
                      "requests",
                      "inputTokens",
                      "outputTokens",
                      "cacheReadTokens",
                      "cost",
                      "timeSeries"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmCost:read"
          ]
        }
      }
    },
    "/api/statistics/models": {
      "get": {
        "operationId": "getModelStatistics",
        "tags": [
          "Statistics"
        ],
        "description": "Get model statistics\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmCost:read`: View LLM usage cost statistics and analytics",
        "parameters": [
          {
            "schema": {
              "default": "24h",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "5m",
                    "15m",
                    "30m",
                    "1h",
                    "24h",
                    "7d",
                    "30d",
                    "90d",
                    "12m",
                    "all"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^custom:[\\s\\S]{0,}_[\\s\\S]{0,}$",
                  "description": "Custom timeframe must be in format 'custom:startTime_endTime'"
                }
              ]
            },
            "in": "query",
            "name": "timeframe",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "model": {
                        "type": "string"
                      },
                      "requests": {
                        "type": "number"
                      },
                      "inputTokens": {
                        "type": "number"
                      },
                      "outputTokens": {
                        "type": "number"
                      },
                      "cacheReadTokens": {
                        "type": "number"
                      },
                      "cost": {
                        "type": "number"
                      },
                      "percentage": {
                        "type": "number"
                      },
                      "timeSeries": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "timestamp": {
                              "type": "string"
                            },
                            "value": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "timestamp",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "model",
                      "requests",
                      "inputTokens",
                      "outputTokens",
                      "cacheReadTokens",
                      "cost",
                      "percentage",
                      "timeSeries"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmCost:read"
          ]
        }
      }
    },
    "/api/statistics/users": {
      "get": {
        "operationId": "getUserStatistics",
        "tags": [
          "Statistics"
        ],
        "description": "Get per-user usage statistics (requests, tokens, cost and model mix), for AI-adoption reporting. Paginated because user cardinality is unbounded. Only traffic that carries a resolved user identity is included; requests authenticated with a shared credential and no user context are not attributed to anyone.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmCost:read`: View LLM usage cost statistics and analytics",
        "parameters": [
          {
            "schema": {
              "default": "24h",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "5m",
                    "15m",
                    "30m",
                    "1h",
                    "24h",
                    "7d",
                    "30d",
                    "90d",
                    "12m",
                    "all"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^custom:[\\s\\S]{0,}_[\\s\\S]{0,}$",
                  "description": "Custom timeframe must be in format 'custom:startTime_endTime'"
                }
              ]
            },
            "in": "query",
            "name": "timeframe",
            "required": false
          },
          {
            "schema": {
              "default": false,
              "type": "string"
            },
            "in": "query",
            "name": "includeTimeSeries",
            "required": false,
            "description": "Include a per-user cost time series. Off by default: it multiplies the response by the number of time buckets."
          },
          {
            "schema": {
              "default": false,
              "type": "string"
            },
            "in": "query",
            "name": "includeModels",
            "required": false,
            "description": "Include each user's per-model usage breakdown. Off by default: it costs an extra aggregation."
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "totalTokens",
                "requests",
                "billedCost",
                "lastActiveAt",
                "userName"
              ]
            },
            "in": "query",
            "name": "sortBy",
            "required": false
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string"
                          },
                          "userName": {
                            "type": "string"
                          },
                          "userEmail": {
                            "type": "string"
                          },
                          "requests": {
                            "type": "number"
                          },
                          "inputTokens": {
                            "type": "number"
                          },
                          "outputTokens": {
                            "type": "number"
                          },
                          "cacheReadTokens": {
                            "type": "number"
                          },
                          "totalTokens": {
                            "type": "number"
                          },
                          "billedCost": {
                            "type": "number"
                          },
                          "subscriptionCost": {
                            "type": "number"
                          },
                          "activeDays": {
                            "type": "number"
                          },
                          "lastActiveAt": {
                            "nullable": true,
                            "type": "string"
                          },
                          "models": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                },
                                "requests": {
                                  "type": "number"
                                },
                                "inputTokens": {
                                  "type": "number"
                                },
                                "outputTokens": {
                                  "type": "number"
                                },
                                "cacheReadTokens": {
                                  "type": "number"
                                },
                                "billedCost": {
                                  "type": "number"
                                },
                                "subscriptionCost": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "model",
                                "requests",
                                "inputTokens",
                                "outputTokens",
                                "cacheReadTokens",
                                "billedCost",
                                "subscriptionCost"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "timeSeries": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "timestamp": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "timestamp",
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "userId",
                          "userName",
                          "userEmail",
                          "requests",
                          "inputTokens",
                          "outputTokens",
                          "cacheReadTokens",
                          "totalTokens",
                          "billedCost",
                          "subscriptionCost",
                          "activeDays",
                          "lastActiveAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmCost:read"
          ]
        }
      }
    },
    "/api/statistics/overview": {
      "get": {
        "operationId": "getOverviewStatistics",
        "tags": [
          "Statistics"
        ],
        "description": "Get overview statistics\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmCost:read`: View LLM usage cost statistics and analytics",
        "parameters": [
          {
            "schema": {
              "default": "24h",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "5m",
                    "15m",
                    "30m",
                    "1h",
                    "24h",
                    "7d",
                    "30d",
                    "90d",
                    "12m",
                    "all"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^custom:[\\s\\S]{0,}_[\\s\\S]{0,}$",
                  "description": "Custom timeframe must be in format 'custom:startTime_endTime'"
                }
              ]
            },
            "in": "query",
            "name": "timeframe",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalRequests": {
                      "type": "number"
                    },
                    "totalTokens": {
                      "type": "number"
                    },
                    "totalCost": {
                      "type": "number"
                    },
                    "topTeam": {
                      "type": "string"
                    },
                    "topAgent": {
                      "type": "string"
                    },
                    "topModel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "totalRequests",
                    "totalTokens",
                    "totalCost",
                    "topTeam",
                    "topAgent",
                    "topModel"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmCost:read"
          ]
        }
      }
    },
    "/api/statistics/cost-savings": {
      "get": {
        "operationId": "getCostSavingsStatistics",
        "tags": [
          "Statistics"
        ],
        "description": "Get cost savings statistics\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmCost:read`: View LLM usage cost statistics and analytics",
        "parameters": [
          {
            "schema": {
              "default": "24h",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "5m",
                    "15m",
                    "30m",
                    "1h",
                    "24h",
                    "7d",
                    "30d",
                    "90d",
                    "12m",
                    "all"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^custom:[\\s\\S]{0,}_[\\s\\S]{0,}$",
                  "description": "Custom timeframe must be in format 'custom:startTime_endTime'"
                }
              ]
            },
            "in": "query",
            "name": "timeframe",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalBaselineCost": {
                      "type": "number"
                    },
                    "totalActualCost": {
                      "type": "number"
                    },
                    "totalSavings": {
                      "type": "number"
                    },
                    "totalSubscriptionCost": {
                      "type": "number"
                    },
                    "totalOptimizationSavings": {
                      "type": "number"
                    },
                    "totalToonSavings": {
                      "type": "number"
                    },
                    "totalCacheSavings": {
                      "type": "number"
                    },
                    "timeSeries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "timestamp": {
                            "type": "string"
                          },
                          "baselineCost": {
                            "type": "number"
                          },
                          "actualCost": {
                            "type": "number"
                          },
                          "optimizationSavings": {
                            "type": "number"
                          },
                          "toonSavings": {
                            "type": "number"
                          },
                          "cacheSavings": {
                            "type": "number"
                          },
                          "subscriptionCost": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "timestamp",
                          "baselineCost",
                          "actualCost",
                          "optimizationSavings",
                          "toonSavings",
                          "cacheSavings",
                          "subscriptionCost"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "totalBaselineCost",
                    "totalActualCost",
                    "totalSavings",
                    "totalSubscriptionCost",
                    "totalOptimizationSavings",
                    "totalToonSavings",
                    "totalCacheSavings",
                    "timeSeries"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmCost:read"
          ]
        }
      }
    },
    "/api/teams": {
      "get": {
        "operationId": "getTeams",
        "tags": [
          "Teams"
        ],
        "description": "Get all teams in the organization\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "name",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "labels",
            "required": false
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "mine",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "createdBy": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "convertToolResultsToToon": {
                            "type": "boolean"
                          },
                          "members": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "teamId": {
                                  "type": "string"
                                },
                                "userId": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string"
                                },
                                "syncedFromSso": {
                                  "type": "boolean"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "id",
                                "teamId",
                                "userId",
                                "role",
                                "syncedFromSso",
                                "createdAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "labels": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "keyId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "valueId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                }
                              },
                              "required": [
                                "key",
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "myRole": {
                            "type": "string",
                            "enum": [
                              "admin",
                              "member"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "organizationId",
                          "createdBy",
                          "createdAt",
                          "updatedAt",
                          "convertToolResultsToToon"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      },
      "post": {
        "operationId": "createTeam",
        "tags": [
          "Teams"
        ],
        "description": "Create a new team\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:create`: Create new teams",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "type": "string"
                  },
                  "convertToolResultsToToon": {
                    "type": "boolean"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "keyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "valueId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "teamId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "syncedFromSso": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "teamId",
                          "userId",
                          "role",
                          "syncedFromSso",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "myRole": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "organizationId",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "convertToolResultsToToon"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:create"
          ]
        }
      }
    },
    "/api/teams/{id}": {
      "get": {
        "operationId": "getTeam",
        "tags": [
          "Teams"
        ],
        "description": "Get a team by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "teamId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "syncedFromSso": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "teamId",
                          "userId",
                          "role",
                          "syncedFromSso",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "myRole": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "organizationId",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "convertToolResultsToToon"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      },
      "put": {
        "operationId": "updateTeam",
        "tags": [
          "Teams"
        ],
        "description": "Update a team\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "description": {
                    "type": "string"
                  },
                  "convertToolResultsToToon": {
                    "type": "boolean"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "keyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "valueId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "nullable": true,
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "convertToolResultsToToon": {
                      "type": "boolean"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "teamId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "syncedFromSso": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "teamId",
                          "userId",
                          "role",
                          "syncedFromSso",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1
                          },
                          "keyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "valueId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "myRole": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "organizationId",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "convertToolResultsToToon"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      },
      "delete": {
        "operationId": "deleteTeam",
        "tags": [
          "Teams"
        ],
        "description": "Delete a team\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:delete`: Delete teams",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:delete"
          ]
        }
      }
    },
    "/api/teams/{id}/members": {
      "get": {
        "operationId": "getTeamMembers",
        "tags": [
          "Teams"
        ],
        "description": "Get all members of a team\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "teamId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "syncedFromSso": {
                        "type": "boolean"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "name": {
                        "nullable": true,
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "image": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "teamId",
                      "userId",
                      "role",
                      "syncedFromSso",
                      "createdAt",
                      "name",
                      "email",
                      "image"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      },
      "post": {
        "operationId": "addTeamMember",
        "tags": [
          "Teams"
        ],
        "description": "Add a member to a team\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "role": {
                    "default": "member",
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  }
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "teamId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "syncedFromSso": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "userId",
                    "role",
                    "syncedFromSso",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/teams/{id}/members/{userId}": {
      "put": {
        "operationId": "updateTeamMember",
        "tags": [
          "Teams"
        ],
        "description": "Update a team member role\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  }
                },
                "required": [
                  "role"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "userId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "teamId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "syncedFromSso": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "userId",
                    "role",
                    "syncedFromSso",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      },
      "delete": {
        "operationId": "removeTeamMember",
        "tags": [
          "Teams"
        ],
        "description": "Remove a member from a team\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "userId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/teams/labels/keys": {
      "get": {
        "operationId": "getTeamLabelKeys",
        "tags": [
          "Teams"
        ],
        "description": "Get all label keys used by teams\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/teams/labels/values": {
      "get": {
        "operationId": "getTeamLabelValues",
        "tags": [
          "Teams"
        ],
        "description": "Get all label values used by teams\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "key",
            "required": false,
            "description": "Filter values by label key"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/teams/{id}/external-groups": {
      "get": {
        "operationId": "getTeamExternalGroups",
        "tags": [
          "Teams"
        ],
        "description": "Get all external groups mapped to a team for SSO team sync\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "teamId": {
                        "type": "string"
                      },
                      "groupIdentifier": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "teamId",
                      "groupIdentifier",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      },
      "post": {
        "operationId": "addTeamExternalGroup",
        "tags": [
          "Teams"
        ],
        "description": "Add an external group mapping to a team for SSO team sync\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groupIdentifier": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "groupIdentifier"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "teamId": {
                      "type": "string"
                    },
                    "groupIdentifier": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "groupIdentifier",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/teams/{id}/external-groups/{groupId}": {
      "delete": {
        "operationId": "removeTeamExternalGroup",
        "tags": [
          "Teams"
        ],
        "description": "Remove an external group mapping from a team for SSO team sync\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "groupId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/tokens": {
      "get": {
        "operationId": "getTokens",
        "tags": [
          "Tokens"
        ],
        "description": "Get tokens visible to the user based on their permissions\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "profileId",
            "required": false,
            "description": "Annotate each token with worksWithProfile: whether it can authenticate against this profile"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "tokenStart": {
                            "type": "string"
                          },
                          "isOrganizationToken": {
                            "type": "boolean"
                          },
                          "team": {
                            "nullable": true,
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "worksWithProfile": {
                            "description": "Only set when the profileId query param is provided: whether this token can authenticate against that profile (org-scoped agents accept any team token; team-scoped agents only their teams'; personal agents none)",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "tokenStart",
                          "isOrganizationToken",
                          "team",
                          "createdAt",
                          "lastUsedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "permissions": {
                      "type": "object",
                      "properties": {
                        "canAccessOrgToken": {
                          "type": "boolean"
                        },
                        "canAccessTeamTokens": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "canAccessOrgToken",
                        "canAccessTeamTokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "tokens",
                    "permissions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/tokens/{tokenId}/value": {
      "get": {
        "operationId": "getTokenValue",
        "tags": [
          "Tokens"
        ],
        "description": "Get the full token value (for copying to clipboard)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "tokenId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/tokens/{tokenId}/rotate": {
      "post": {
        "operationId": "rotateToken",
        "tags": [
          "Tokens"
        ],
        "description": "Rotate a token (generate new value)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "tokenId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tokenStart": {
                      "type": "string"
                    },
                    "isOrganizationToken": {
                      "type": "boolean"
                    },
                    "team": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "worksWithProfile": {
                      "description": "Only set when the profileId query param is provided: whether this token can authenticate against that profile (org-scoped agents accept any team token; team-scoped agents only their teams'; personal agents none)",
                      "type": "boolean"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "tokenStart",
                    "isOrganizationToken",
                    "team",
                    "createdAt",
                    "lastUsedAt",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/tools": {
      "get": {
        "operationId": "getTools",
        "tags": [
          "Tools"
        ],
        "description": "Get all tools\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "catalogId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "delegateToAgentId": {
                        "nullable": true,
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "rawName": {
                        "nullable": true,
                        "type": "string"
                      },
                      "parameters": {
                        "anyOf": [
                          {
                            "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                            "type": "object",
                            "additionalProperties": {}
                          }
                        ]
                      },
                      "description": {
                        "nullable": true,
                        "type": "string"
                      },
                      "meta": {
                        "nullable": true,
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "nullable": true,
                                "enum": [
                                  null
                                ]
                              }
                            ]
                          },
                          {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          {
                            "type": "array",
                            "items": {}
                          }
                        ]
                      },
                      "clonedPendingDiscovery": {
                        "type": "boolean"
                      },
                      "policiesAutoConfiguredAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "policiesAutoConfiguringStartedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "policiesAutoConfiguredReasoning": {
                        "nullable": true,
                        "type": "string"
                      },
                      "policiesAutoConfiguredModel": {
                        "nullable": true,
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "deletedAt": {
                        "nullable": true,
                        "type": "string",
                        "format": "date-time"
                      },
                      "agent": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      },
                      "catalog": {
                        "nullable": true,
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "catalogId",
                      "delegateToAgentId",
                      "name",
                      "rawName",
                      "description",
                      "meta",
                      "clonedPendingDiscovery",
                      "policiesAutoConfiguredAt",
                      "policiesAutoConfiguringStartedAt",
                      "policiesAutoConfiguredReasoning",
                      "policiesAutoConfiguredModel",
                      "createdAt",
                      "updatedAt",
                      "deletedAt",
                      "agent",
                      "catalog"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      }
    },
    "/api/tools/with-assignments": {
      "get": {
        "operationId": "getToolsWithAssignments",
        "tags": [
          "Tools"
        ],
        "description": "Get all tools with their profile assignments (one entry per tool)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "origin",
                "createdAt",
                "assignmentCount"
              ]
            },
            "in": "query",
            "name": "sortBy",
            "required": false
          },
          {
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sortDirection",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "origin",
            "required": false,
            "description": "Can be 'llm-proxy', 'agent', or a catalogId"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "observedByUserId",
            "required": false,
            "description": "Only tools observed in this user's LLM proxy traffic"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "claude",
                "codex",
                "copilot-cli"
              ]
            },
            "in": "query",
            "name": "observedByClient",
            "required": false,
            "description": "Only tools observed from this client app family (e.g. claude, codex)"
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "excludeArchestraTools",
            "required": false,
            "description": "Hide built-in Archestra tools"
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "includeKnowledgeSourcesTool",
            "required": false,
            "description": "Include the built-in query_knowledge_sources tool in global listings (default: hidden)"
          },
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "nullable": true,
                            "type": "string"
                          },
                          "parameters": {
                            "anyOf": [
                              {
                                "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                                "type": "object",
                                "additionalProperties": {}
                              }
                            ]
                          },
                          "annotations": {
                            "nullable": true,
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "catalogId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "policiesAutoConfiguredReasoning": {
                            "nullable": true,
                            "type": "string"
                          },
                          "policiesAutoConfiguredModel": {
                            "nullable": true,
                            "type": "string"
                          },
                          "assignmentCount": {
                            "type": "number"
                          },
                          "assignments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "agentToolId": {
                                  "type": "string"
                                },
                                "agent": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "mcpServerId": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "credentialOwnerEmail": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "executionOwnerEmail": {
                                  "nullable": true,
                                  "type": "string"
                                },
                                "credentialResolutionMode": {
                                  "type": "string",
                                  "enum": [
                                    "static",
                                    "dynamic",
                                    "enterprise_managed"
                                  ]
                                }
                              },
                              "required": [
                                "agentToolId",
                                "agent",
                                "mcpServerId",
                                "credentialOwnerEmail",
                                "executionOwnerEmail",
                                "credentialResolutionMode"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "annotations",
                          "catalogId",
                          "createdAt",
                          "updatedAt",
                          "policiesAutoConfiguredAt",
                          "policiesAutoConfiguredReasoning",
                          "policiesAutoConfiguredModel",
                          "assignmentCount",
                          "assignments"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      }
    },
    "/api/tools/observers": {
      "get": {
        "operationId": "getToolObservers",
        "tags": [
          "Tools"
        ],
        "description": "Get filter options for observed tools: the users who have observed tools in LLM proxy traffic, and the client app families their observations came from\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "clients": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "claude",
                          "codex",
                          "copilot-cli"
                        ]
                      }
                    }
                  },
                  "required": [
                    "users",
                    "clients"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      }
    },
    "/api/tools/{id}": {
      "get": {
        "operationId": "getTool",
        "tags": [
          "Tools"
        ],
        "description": "Get a single tool's policy-editor fields (id, name, parameters) by id, scoped to what the caller can access\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:read`: View tools, tool invocation policies, and trusted data policies",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "parameters": {
                      "anyOf": [
                        {
                          "description": "\n    https://github.com/openai/openai-node/blob/master/src/resources/shared.ts#L217\n\n    The parameters the functions accepts, described as a JSON Schema object. See the\n    [guide](https://platform.openai.com/docs/guides/function-calling) for examples,\n    and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for\n    documentation about the format.\n\n    Omitting parameters defines a function with an empty parameter list.\n  ",
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:read"
          ]
        }
      },
      "delete": {
        "operationId": "deleteTool",
        "tags": [
          "Tools"
        ],
        "description": "Delete an auto-discovered tool (tools without an MCP server)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`toolPolicy:delete`: Remove tools and security policies",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "toolPolicy:delete"
          ]
        }
      }
    },
    "/api/user/permissions": {
      "get": {
        "operationId": "getUserPermissions",
        "tags": [
          "User"
        ],
        "description": "Get current user's permissions\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "create",
                        "read",
                        "update",
                        "delete",
                        "team-admin",
                        "admin",
                        "cancel",
                        "enable",
                        "query",
                        "execute",
                        "deploy-to-restricted",
                        "manage",
                        "manage-deleted",
                        "read-all",
                        "share-org",
                        "impersonate"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/user/impersonable": {
      "get": {
        "operationId": "getImpersonableUsers",
        "tags": [
          "User"
        ],
        "description": "List users in the caller's organization that admins can impersonate (role debugger)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`member:impersonate`: Temporarily sign in as another member to see the app with their access (role debugging)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "role": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "email",
                      "role"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "member:impersonate"
          ]
        }
      }
    },
    "/api/user-tokens/me": {
      "get": {
        "operationId": "getUserToken",
        "tags": [
          "User Tokens"
        ],
        "description": "Get current user's personal token\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tokenStart": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "tokenStart",
                    "createdAt",
                    "lastUsedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/user-tokens/me/value": {
      "get": {
        "operationId": "getUserTokenValue",
        "tags": [
          "User Tokens"
        ],
        "description": "Get the full personal token value\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/user-tokens/me/rotate": {
      "post": {
        "operationId": "rotateUserToken",
        "tags": [
          "User Tokens"
        ],
        "description": "Rotate personal token (generate new value)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tokenStart": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "tokenStart",
                    "createdAt",
                    "lastUsedAt",
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/llm-virtual-keys": {
      "get": {
        "operationId": "getAllVirtualApiKeys",
        "tags": [
          "Virtual API Keys"
        ],
        "description": "Get virtual API keys visible to the current user, with provider key mappings\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmVirtualKey:read`: View LLM virtual keys",
        "parameters": [
          {
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "in": "query",
            "name": "offset",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "query",
            "name": "providerApiKeyId",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "standard",
                "passthrough"
              ]
            },
            "in": "query",
            "name": "keyType",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string",
                            "maxLength": 256
                          },
                          "keyType": {
                            "type": "string",
                            "enum": [
                              "standard",
                              "passthrough"
                            ]
                          },
                          "secretId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "tokenStart": {
                            "type": "string",
                            "maxLength": 16
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "personal",
                              "team",
                              "org"
                            ]
                          },
                          "authorId": {
                            "nullable": true,
                            "type": "string"
                          },
                          "expiresAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastUsedAt": {
                            "nullable": true,
                            "type": "string",
                            "format": "date-time"
                          },
                          "teams": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "authorName": {
                            "nullable": true,
                            "type": "string"
                          },
                          "providerApiKeys": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "openai",
                                    "gemini",
                                    "anthropic",
                                    "bedrock",
                                    "cohere",
                                    "cerebras",
                                    "mistral",
                                    "perplexity",
                                    "groq",
                                    "xai",
                                    "openrouter",
                                    "vllm",
                                    "ollama",
                                    "ollama-native",
                                    "zhipuai",
                                    "deepseek",
                                    "minimax",
                                    "kimi",
                                    "azure",
                                    "github-copilot",
                                    "microsoft-365-copilot",
                                    "archestra"
                                  ]
                                },
                                "providerApiKeyId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "providerApiKeyName": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "provider",
                                "providerApiKeyId",
                                "providerApiKeyName"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "name",
                          "keyType",
                          "secretId",
                          "tokenStart",
                          "scope",
                          "authorId",
                          "expiresAt",
                          "createdAt",
                          "lastUsedAt",
                          "teams",
                          "authorName",
                          "providerApiKeys"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "currentPage": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "limit": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalPages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "hasNext": {
                          "type": "boolean"
                        },
                        "hasPrev": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "currentPage",
                        "limit",
                        "total",
                        "totalPages",
                        "hasNext",
                        "hasPrev"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmVirtualKey:read"
          ]
        }
      },
      "post": {
        "operationId": "createVirtualApiKey",
        "tags": [
          "Virtual API Keys"
        ],
        "description": "Create a new virtual API key. Returns the full token value once.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmVirtualKey:create`: Create LLM virtual keys",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "keyType": {
                    "default": "standard",
                    "type": "string",
                    "enum": [
                      "standard",
                      "passthrough"
                    ]
                  },
                  "expiresAt": {
                    "nullable": true
                  },
                  "scope": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teams": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "providerApiKeys": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "openai",
                            "gemini",
                            "anthropic",
                            "bedrock",
                            "cohere",
                            "cerebras",
                            "mistral",
                            "perplexity",
                            "groq",
                            "xai",
                            "openrouter",
                            "vllm",
                            "ollama",
                            "ollama-native",
                            "zhipuai",
                            "deepseek",
                            "minimax",
                            "kimi",
                            "azure",
                            "github-copilot",
                            "microsoft-365-copilot",
                            "archestra"
                          ]
                        },
                        "providerApiKeyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "provider",
                        "providerApiKeyId"
                      ]
                    }
                  },
                  "ownerId": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 256
                    },
                    "keyType": {
                      "type": "string",
                      "enum": [
                        "standard",
                        "passthrough"
                      ]
                    },
                    "secretId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "tokenStart": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "value": {
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "providerApiKeys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "gemini",
                              "anthropic",
                              "bedrock",
                              "cohere",
                              "cerebras",
                              "mistral",
                              "perplexity",
                              "groq",
                              "xai",
                              "openrouter",
                              "vllm",
                              "ollama",
                              "ollama-native",
                              "zhipuai",
                              "deepseek",
                              "minimax",
                              "kimi",
                              "azure",
                              "github-copilot",
                              "microsoft-365-copilot",
                              "archestra"
                            ]
                          },
                          "providerApiKeyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "providerApiKeyName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "provider",
                          "providerApiKeyId",
                          "providerApiKeyName"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "keyType",
                    "secretId",
                    "tokenStart",
                    "scope",
                    "authorId",
                    "expiresAt",
                    "createdAt",
                    "lastUsedAt",
                    "value",
                    "teams",
                    "authorName",
                    "providerApiKeys"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmVirtualKey:create"
          ]
        }
      }
    },
    "/api/llm-virtual-keys/{id}": {
      "get": {
        "operationId": "getVirtualApiKey",
        "tags": [
          "Virtual API Keys"
        ],
        "description": "Get a virtual API key visible to the current user, with provider key mappings\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmVirtualKey:read`: View LLM virtual keys",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 256
                    },
                    "keyType": {
                      "type": "string",
                      "enum": [
                        "standard",
                        "passthrough"
                      ]
                    },
                    "secretId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "tokenStart": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "providerApiKeys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "gemini",
                              "anthropic",
                              "bedrock",
                              "cohere",
                              "cerebras",
                              "mistral",
                              "perplexity",
                              "groq",
                              "xai",
                              "openrouter",
                              "vllm",
                              "ollama",
                              "ollama-native",
                              "zhipuai",
                              "deepseek",
                              "minimax",
                              "kimi",
                              "azure",
                              "github-copilot",
                              "microsoft-365-copilot",
                              "archestra"
                            ]
                          },
                          "providerApiKeyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "providerApiKeyName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "provider",
                          "providerApiKeyId",
                          "providerApiKeyName"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "keyType",
                    "secretId",
                    "tokenStart",
                    "scope",
                    "authorId",
                    "expiresAt",
                    "createdAt",
                    "lastUsedAt",
                    "teams",
                    "authorName",
                    "providerApiKeys"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmVirtualKey:read"
          ]
        }
      },
      "patch": {
        "operationId": "updateVirtualApiKey",
        "tags": [
          "Virtual API Keys"
        ],
        "description": "Update a virtual API key\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmVirtualKey:update`: Modify LLM virtual keys and their visibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "keyType": {
                    "default": "standard",
                    "type": "string",
                    "enum": [
                      "standard",
                      "passthrough"
                    ]
                  },
                  "expiresAt": {
                    "nullable": true
                  },
                  "scope": {
                    "default": "org",
                    "type": "string",
                    "enum": [
                      "personal",
                      "team",
                      "org"
                    ]
                  },
                  "teams": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "providerApiKeys": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "openai",
                            "gemini",
                            "anthropic",
                            "bedrock",
                            "cohere",
                            "cerebras",
                            "mistral",
                            "perplexity",
                            "groq",
                            "xai",
                            "openrouter",
                            "vllm",
                            "ollama",
                            "ollama-native",
                            "zhipuai",
                            "deepseek",
                            "minimax",
                            "kimi",
                            "azure",
                            "github-copilot",
                            "microsoft-365-copilot",
                            "archestra"
                          ]
                        },
                        "providerApiKeyId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "provider",
                        "providerApiKeyId"
                      ]
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 256
                    },
                    "keyType": {
                      "type": "string",
                      "enum": [
                        "standard",
                        "passthrough"
                      ]
                    },
                    "secretId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "tokenStart": {
                      "type": "string",
                      "maxLength": 16
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "personal",
                        "team",
                        "org"
                      ]
                    },
                    "authorId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "expiresAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lastUsedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "authorName": {
                      "nullable": true,
                      "type": "string"
                    },
                    "providerApiKeys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "openai",
                              "gemini",
                              "anthropic",
                              "bedrock",
                              "cohere",
                              "cerebras",
                              "mistral",
                              "perplexity",
                              "groq",
                              "xai",
                              "openrouter",
                              "vllm",
                              "ollama",
                              "ollama-native",
                              "zhipuai",
                              "deepseek",
                              "minimax",
                              "kimi",
                              "azure",
                              "github-copilot",
                              "microsoft-365-copilot",
                              "archestra"
                            ]
                          },
                          "providerApiKeyId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "providerApiKeyName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "provider",
                          "providerApiKeyId",
                          "providerApiKeyName"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "keyType",
                    "secretId",
                    "tokenStart",
                    "scope",
                    "authorId",
                    "expiresAt",
                    "createdAt",
                    "lastUsedAt",
                    "teams",
                    "authorName",
                    "providerApiKeys"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmVirtualKey:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteVirtualApiKey",
        "tags": [
          "Virtual API Keys"
        ],
        "description": "Delete a virtual API key\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmVirtualKey:delete`: Delete LLM virtual keys",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmVirtualKey:delete"
          ]
        }
      }
    },
    "/api/llm-virtual-keys/{id}/value": {
      "get": {
        "operationId": "getVirtualApiKeyValue",
        "tags": [
          "Virtual API Keys"
        ],
        "description": "Get the raw value of a virtual API key. Only the key's author can reveal it.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`llmVirtualKey:read`: View LLM virtual keys",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "value"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "llmVirtualKey:read"
          ]
        }
      }
    },
    "/v1/vllm/embeddings": {
      "post": {
        "operationId": "vllmEmbeddingsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with vLLM (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/vllm/{agentId}/embeddings": {
      "post": {
        "operationId": "vllmEmbeddingsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with vLLM for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/vllm/chat/completions": {
      "post": {
        "operationId": "vllmChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with vLLM (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VllmChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for vLLM (often not required)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VllmChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/vllm/{agentId}/chat/completions": {
      "post": {
        "operationId": "vllmChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with vLLM for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VllmChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": false,
            "description": "Bearer token for vLLM (often not required)"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VllmChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/xai/chat/completions": {
      "post": {
        "operationId": "xaiChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with xAI (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XaiChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/xai/{agentId}/chat/completions": {
      "post": {
        "operationId": "xaiChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with xAI for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XaiChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/xai-subscription-auth/device/start": {
      "post": {
        "operationId": "xaiSubscriptionDeviceAuthStart",
        "tags": [
          "xAI Subscription Auth"
        ],
        "description": "Start the xAI OAuth device flow used to connect an X Premium (SuperGrok) subscription as an xAI provider credential\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deviceCode": {
                      "type": "string"
                    },
                    "userCode": {
                      "type": "string"
                    },
                    "verificationUri": {
                      "type": "string"
                    },
                    "interval": {
                      "type": "number"
                    },
                    "expiresIn": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "deviceCode",
                    "userCode",
                    "verificationUri",
                    "interval",
                    "expiresIn"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/xai-subscription-auth/device/poll": {
      "post": {
        "operationId": "xaiSubscriptionDeviceAuthPoll",
        "tags": [
          "xAI Subscription Auth"
        ],
        "description": "Poll the xAI OAuth device flow once; returns the encoded provider credential when the user has authorized\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deviceCode": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "deviceCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "slow_down"
                          ]
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "complete"
                          ]
                        },
                        "credential": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "credential"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/v1/zhipuai/embeddings": {
      "post": {
        "operationId": "zhipuaiEmbeddingsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Zhipu AI (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/zhipuai/{agentId}/embeddings": {
      "post": {
        "operationId": "zhipuaiEmbeddingsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create embeddings with Zhipu AI for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "input": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "dimensions": {
                    "type": "number"
                  },
                  "encoding_format": {
                    "type": "string",
                    "enum": [
                      "float",
                      "base64"
                    ]
                  }
                },
                "required": [
                  "model",
                  "input"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for OpenAI"
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "embedding"
                            ]
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          },
                          "index": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "object",
                          "embedding"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "model": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "number"
                        },
                        "total_tokens": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "prompt_tokens",
                        "total_tokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "model",
                    "usage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/zhipuai/chat/completions": {
      "post": {
        "operationId": "zhipuaiChatCompletionsWithDefaultAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Zhipu AI (uses default agent)\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ZhipuaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for Zhipu AI"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "accept-language",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZhipuaiChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/v1/zhipuai/{agentId}/chat/completions": {
      "post": {
        "operationId": "zhipuaiChatCompletionsWithAgent",
        "tags": [
          "LLM Proxy"
        ],
        "description": "Create a chat completion with Zhipu AI for a specific agent\n\nAuthentication:\n\nThis route accepts either an LLM provider API key or a Virtual API Key. See [LLM Proxy Authentication](/docs/platform-llm-proxy-authentication).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ZhipuaiChatCompletionRequestInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "agentId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "user-agent",
            "required": false,
            "description": "The user agent of the client"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "authorization",
            "required": true,
            "description": "Bearer token for Zhipu AI"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "accept-language",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZhipuaiChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/identity-providers/public": {
      "get": {
        "operationId": "getPublicIdentityProviders",
        "tags": [
          "Identity Providers"
        ],
        "description": "Get public identity provider list for login page (no secrets exposed)\n\nAuthentication:\n\nNot required.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "providerId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "providerId"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/identity-providers": {
      "get": {
        "operationId": "getIdentityProviders",
        "tags": [
          "Identity Providers"
        ],
        "description": "Get all identity providers with full configuration (admin only)\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`identityProvider:read`: View identity provider configurations (SSO)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "issuer": {
                        "type": "string"
                      },
                      "oidcConfig": {
                        "type": "object",
                        "properties": {
                          "issuer": {
                            "type": "string"
                          },
                          "skipDiscovery": {
                            "type": "boolean"
                          },
                          "pkce": {
                            "type": "boolean"
                          },
                          "enableRpInitiatedLogout": {
                            "type": "boolean"
                          },
                          "hd": {
                            "type": "string"
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "authorizationEndpoint": {
                            "type": "string"
                          },
                          "discoveryEndpoint": {
                            "type": "string"
                          },
                          "userInfoEndpoint": {
                            "type": "string"
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "overrideUserInfo": {
                            "type": "boolean"
                          },
                          "tokenEndpoint": {
                            "type": "string"
                          },
                          "tokenEndpointAuthentication": {
                            "type": "string",
                            "enum": [
                              "client_secret_post",
                              "client_secret_basic",
                              "private_key_jwt"
                            ]
                          },
                          "jwksEndpoint": {
                            "type": "string"
                          },
                          "enterpriseManagedCredentials": {
                            "type": "object",
                            "properties": {
                              "exchangeStrategy": {
                                "type": "string",
                                "enum": [
                                  "rfc8693",
                                  "okta_managed",
                                  "entra_obo"
                                ]
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "clientSecret": {
                                "type": "string"
                              },
                              "tokenEndpoint": {
                                "type": "string"
                              },
                              "tokenEndpointAuthentication": {
                                "type": "string",
                                "enum": [
                                  "client_secret_post",
                                  "client_secret_basic",
                                  "private_key_jwt"
                                ]
                              },
                              "privateKeyPem": {
                                "type": "string"
                              },
                              "privateKeyId": {
                                "type": "string"
                              },
                              "clientAssertionAudience": {
                                "type": "string"
                              },
                              "subjectTokenType": {
                                "type": "string",
                                "enum": [
                                  "urn:ietf:params:oauth:token-type:access_token",
                                  "urn:ietf:params:oauth:token-type:id_token",
                                  "urn:ietf:params:oauth:token-type:jwt"
                                ]
                              }
                            },
                            "additionalProperties": false
                          },
                          "mapping": {
                            "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3",
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "emailVerified": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "image": {
                                "type": "string"
                              },
                              "extraFields": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string"
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "issuer",
                          "pkce",
                          "clientId",
                          "clientSecret",
                          "discoveryEndpoint"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22"
                      },
                      "samlConfig": {
                        "type": "object",
                        "properties": {
                          "issuer": {
                            "type": "string"
                          },
                          "entryPoint": {
                            "type": "string"
                          },
                          "cert": {
                            "type": "string"
                          },
                          "callbackUrl": {
                            "type": "string"
                          },
                          "audience": {
                            "type": "string"
                          },
                          "idpMetadata": {
                            "type": "object",
                            "properties": {
                              "metadata": {
                                "type": "string"
                              },
                              "entityID": {
                                "type": "string"
                              },
                              "entityURL": {
                                "type": "string"
                              },
                              "redirectURL": {
                                "type": "string"
                              },
                              "cert": {
                                "type": "string"
                              },
                              "privateKey": {
                                "type": "string"
                              },
                              "privateKeyPass": {
                                "type": "string"
                              },
                              "isAssertionEncrypted": {
                                "type": "boolean"
                              },
                              "encPrivateKey": {
                                "type": "string"
                              },
                              "encPrivateKeyPass": {
                                "type": "string"
                              },
                              "singleSignOnService": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "Binding": {
                                      "type": "string"
                                    },
                                    "Location": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "Binding",
                                    "Location"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "additionalProperties": false
                          },
                          "spMetadata": {
                            "type": "object",
                            "properties": {
                              "metadata": {
                                "type": "string"
                              },
                              "entityID": {
                                "type": "string"
                              },
                              "binding": {
                                "type": "string"
                              },
                              "privateKey": {
                                "type": "string"
                              },
                              "privateKeyPass": {
                                "type": "string"
                              },
                              "isAssertionEncrypted": {
                                "type": "boolean"
                              },
                              "encPrivateKey": {
                                "type": "string"
                              },
                              "encPrivateKeyPass": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          },
                          "wantAssertionsSigned": {
                            "type": "boolean"
                          },
                          "signatureAlgorithm": {
                            "type": "string"
                          },
                          "digestAlgorithm": {
                            "type": "string"
                          },
                          "identifierFormat": {
                            "type": "string"
                          },
                          "privateKey": {
                            "type": "string"
                          },
                          "decryptionPvk": {
                            "type": "string"
                          },
                          "additionalParams": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "mapping": {
                            "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2",
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "emailVerified": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "firstName": {
                                "type": "string"
                              },
                              "lastName": {
                                "type": "string"
                              },
                              "extraFields": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string"
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "issuer",
                          "entryPoint",
                          "cert",
                          "callbackUrl",
                          "spMetadata"
                        ],
                        "additionalProperties": false,
                        "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40"
                      },
                      "roleMapping": {
                        "type": "object",
                        "properties": {
                          "rules": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "expression": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "role": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "expression",
                                "role"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "defaultRole": {
                            "type": "string"
                          },
                          "strictMode": {
                            "type": "boolean"
                          },
                          "skipRoleSync": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      },
                      "teamSyncConfig": {
                        "type": "object",
                        "properties": {
                          "groupsExpression": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      },
                      "userId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "providerId": {
                        "type": "string"
                      },
                      "organizationId": {
                        "nullable": true,
                        "type": "string"
                      },
                      "domain": {
                        "type": "string"
                      },
                      "domainVerified": {
                        "nullable": true,
                        "type": "boolean"
                      },
                      "ssoLoginEnabled": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "issuer",
                      "userId",
                      "providerId",
                      "organizationId",
                      "domain",
                      "domainVerified",
                      "ssoLoginEnabled"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "identityProvider:read"
          ]
        }
      },
      "post": {
        "operationId": "createIdentityProvider",
        "tags": [
          "Identity Providers"
        ],
        "description": "Create a new identity provider\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`identityProvider:create`: Set up new identity providers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "issuer": {
                    "type": "string"
                  },
                  "oidcConfig": {
                    "type": "object",
                    "properties": {
                      "issuer": {
                        "type": "string"
                      },
                      "skipDiscovery": {
                        "type": "boolean"
                      },
                      "pkce": {
                        "type": "boolean"
                      },
                      "enableRpInitiatedLogout": {
                        "type": "boolean"
                      },
                      "hd": {
                        "type": "string"
                      },
                      "clientId": {
                        "type": "string"
                      },
                      "clientSecret": {
                        "type": "string"
                      },
                      "authorizationEndpoint": {
                        "type": "string"
                      },
                      "discoveryEndpoint": {
                        "type": "string"
                      },
                      "userInfoEndpoint": {
                        "type": "string"
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "overrideUserInfo": {
                        "type": "boolean"
                      },
                      "tokenEndpoint": {
                        "type": "string"
                      },
                      "tokenEndpointAuthentication": {
                        "type": "string",
                        "enum": [
                          "client_secret_post",
                          "client_secret_basic",
                          "private_key_jwt"
                        ]
                      },
                      "jwksEndpoint": {
                        "type": "string"
                      },
                      "enterpriseManagedCredentials": {
                        "type": "object",
                        "properties": {
                          "exchangeStrategy": {
                            "type": "string",
                            "enum": [
                              "rfc8693",
                              "okta_managed",
                              "entra_obo"
                            ]
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "tokenEndpoint": {
                            "type": "string"
                          },
                          "tokenEndpointAuthentication": {
                            "type": "string",
                            "enum": [
                              "client_secret_post",
                              "client_secret_basic",
                              "private_key_jwt"
                            ]
                          },
                          "privateKeyPem": {
                            "type": "string"
                          },
                          "privateKeyId": {
                            "type": "string"
                          },
                          "clientAssertionAudience": {
                            "type": "string"
                          },
                          "subjectTokenType": {
                            "type": "string",
                            "enum": [
                              "urn:ietf:params:oauth:token-type:access_token",
                              "urn:ietf:params:oauth:token-type:id_token",
                              "urn:ietf:params:oauth:token-type:jwt"
                            ]
                          }
                        }
                      },
                      "mapping": {
                        "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3",
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "emailVerified": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "image": {
                            "type": "string"
                          },
                          "extraFields": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "issuer",
                      "pkce",
                      "clientId",
                      "clientSecret",
                      "discoveryEndpoint"
                    ],
                    "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22"
                  },
                  "samlConfig": {
                    "type": "object",
                    "properties": {
                      "issuer": {
                        "type": "string"
                      },
                      "entryPoint": {
                        "type": "string"
                      },
                      "cert": {
                        "type": "string"
                      },
                      "callbackUrl": {
                        "type": "string"
                      },
                      "audience": {
                        "type": "string"
                      },
                      "idpMetadata": {
                        "type": "object",
                        "properties": {
                          "metadata": {
                            "type": "string"
                          },
                          "entityID": {
                            "type": "string"
                          },
                          "entityURL": {
                            "type": "string"
                          },
                          "redirectURL": {
                            "type": "string"
                          },
                          "cert": {
                            "type": "string"
                          },
                          "privateKey": {
                            "type": "string"
                          },
                          "privateKeyPass": {
                            "type": "string"
                          },
                          "isAssertionEncrypted": {
                            "type": "boolean"
                          },
                          "encPrivateKey": {
                            "type": "string"
                          },
                          "encPrivateKeyPass": {
                            "type": "string"
                          },
                          "singleSignOnService": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "Binding": {
                                  "type": "string"
                                },
                                "Location": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "Binding",
                                "Location"
                              ]
                            }
                          }
                        }
                      },
                      "spMetadata": {
                        "type": "object",
                        "properties": {
                          "metadata": {
                            "type": "string"
                          },
                          "entityID": {
                            "type": "string"
                          },
                          "binding": {
                            "type": "string"
                          },
                          "privateKey": {
                            "type": "string"
                          },
                          "privateKeyPass": {
                            "type": "string"
                          },
                          "isAssertionEncrypted": {
                            "type": "boolean"
                          },
                          "encPrivateKey": {
                            "type": "string"
                          },
                          "encPrivateKeyPass": {
                            "type": "string"
                          }
                        }
                      },
                      "wantAssertionsSigned": {
                        "type": "boolean"
                      },
                      "signatureAlgorithm": {
                        "type": "string"
                      },
                      "digestAlgorithm": {
                        "type": "string"
                      },
                      "identifierFormat": {
                        "type": "string"
                      },
                      "privateKey": {
                        "type": "string"
                      },
                      "decryptionPvk": {
                        "type": "string"
                      },
                      "additionalParams": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "mapping": {
                        "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2",
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "emailVerified": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "firstName": {
                            "type": "string"
                          },
                          "lastName": {
                            "type": "string"
                          },
                          "extraFields": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "issuer",
                      "entryPoint",
                      "cert",
                      "callbackUrl",
                      "spMetadata"
                    ],
                    "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40"
                  },
                  "roleMapping": {
                    "type": "object",
                    "properties": {
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "expression": {
                              "type": "string",
                              "minLength": 1
                            },
                            "role": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "expression",
                            "role"
                          ]
                        }
                      },
                      "defaultRole": {
                        "type": "string"
                      },
                      "strictMode": {
                        "type": "boolean"
                      },
                      "skipRoleSync": {
                        "type": "boolean"
                      }
                    }
                  },
                  "teamSyncConfig": {
                    "type": "object",
                    "properties": {
                      "groupsExpression": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  },
                  "userId": {
                    "nullable": true,
                    "type": "string"
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "domain": {
                    "type": "string"
                  },
                  "domainVerified": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "ssoLoginEnabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "issuer",
                  "providerId",
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "issuer": {
                      "type": "string"
                    },
                    "oidcConfig": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "string"
                        },
                        "skipDiscovery": {
                          "type": "boolean"
                        },
                        "pkce": {
                          "type": "boolean"
                        },
                        "enableRpInitiatedLogout": {
                          "type": "boolean"
                        },
                        "hd": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        },
                        "authorizationEndpoint": {
                          "type": "string"
                        },
                        "discoveryEndpoint": {
                          "type": "string"
                        },
                        "userInfoEndpoint": {
                          "type": "string"
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "overrideUserInfo": {
                          "type": "boolean"
                        },
                        "tokenEndpoint": {
                          "type": "string"
                        },
                        "tokenEndpointAuthentication": {
                          "type": "string",
                          "enum": [
                            "client_secret_post",
                            "client_secret_basic",
                            "private_key_jwt"
                          ]
                        },
                        "jwksEndpoint": {
                          "type": "string"
                        },
                        "enterpriseManagedCredentials": {
                          "type": "object",
                          "properties": {
                            "exchangeStrategy": {
                              "type": "string",
                              "enum": [
                                "rfc8693",
                                "okta_managed",
                                "entra_obo"
                              ]
                            },
                            "clientId": {
                              "type": "string"
                            },
                            "clientSecret": {
                              "type": "string"
                            },
                            "tokenEndpoint": {
                              "type": "string"
                            },
                            "tokenEndpointAuthentication": {
                              "type": "string",
                              "enum": [
                                "client_secret_post",
                                "client_secret_basic",
                                "private_key_jwt"
                              ]
                            },
                            "privateKeyPem": {
                              "type": "string"
                            },
                            "privateKeyId": {
                              "type": "string"
                            },
                            "clientAssertionAudience": {
                              "type": "string"
                            },
                            "subjectTokenType": {
                              "type": "string",
                              "enum": [
                                "urn:ietf:params:oauth:token-type:access_token",
                                "urn:ietf:params:oauth:token-type:id_token",
                                "urn:ietf:params:oauth:token-type:jwt"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "mapping": {
                          "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3",
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "emailVerified": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "image": {
                              "type": "string"
                            },
                            "extraFields": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "issuer",
                        "pkce",
                        "clientId",
                        "clientSecret",
                        "discoveryEndpoint"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22"
                    },
                    "samlConfig": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "string"
                        },
                        "entryPoint": {
                          "type": "string"
                        },
                        "cert": {
                          "type": "string"
                        },
                        "callbackUrl": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "idpMetadata": {
                          "type": "object",
                          "properties": {
                            "metadata": {
                              "type": "string"
                            },
                            "entityID": {
                              "type": "string"
                            },
                            "entityURL": {
                              "type": "string"
                            },
                            "redirectURL": {
                              "type": "string"
                            },
                            "cert": {
                              "type": "string"
                            },
                            "privateKey": {
                              "type": "string"
                            },
                            "privateKeyPass": {
                              "type": "string"
                            },
                            "isAssertionEncrypted": {
                              "type": "boolean"
                            },
                            "encPrivateKey": {
                              "type": "string"
                            },
                            "encPrivateKeyPass": {
                              "type": "string"
                            },
                            "singleSignOnService": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "Binding": {
                                    "type": "string"
                                  },
                                  "Location": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "Binding",
                                  "Location"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "spMetadata": {
                          "type": "object",
                          "properties": {
                            "metadata": {
                              "type": "string"
                            },
                            "entityID": {
                              "type": "string"
                            },
                            "binding": {
                              "type": "string"
                            },
                            "privateKey": {
                              "type": "string"
                            },
                            "privateKeyPass": {
                              "type": "string"
                            },
                            "isAssertionEncrypted": {
                              "type": "boolean"
                            },
                            "encPrivateKey": {
                              "type": "string"
                            },
                            "encPrivateKeyPass": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "wantAssertionsSigned": {
                          "type": "boolean"
                        },
                        "signatureAlgorithm": {
                          "type": "string"
                        },
                        "digestAlgorithm": {
                          "type": "string"
                        },
                        "identifierFormat": {
                          "type": "string"
                        },
                        "privateKey": {
                          "type": "string"
                        },
                        "decryptionPvk": {
                          "type": "string"
                        },
                        "additionalParams": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "mapping": {
                          "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2",
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "emailVerified": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "firstName": {
                              "type": "string"
                            },
                            "lastName": {
                              "type": "string"
                            },
                            "extraFields": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "issuer",
                        "entryPoint",
                        "cert",
                        "callbackUrl",
                        "spMetadata"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40"
                    },
                    "roleMapping": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "expression": {
                                "type": "string",
                                "minLength": 1
                              },
                              "role": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "expression",
                              "role"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "defaultRole": {
                          "type": "string"
                        },
                        "strictMode": {
                          "type": "boolean"
                        },
                        "skipRoleSync": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "teamSyncConfig": {
                      "type": "object",
                      "properties": {
                        "groupsExpression": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "userId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "providerId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "domain": {
                      "type": "string"
                    },
                    "domainVerified": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "ssoLoginEnabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "issuer",
                    "userId",
                    "providerId",
                    "organizationId",
                    "domain",
                    "domainVerified",
                    "ssoLoginEnabled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "identityProvider:create"
          ]
        }
      }
    },
    "/api/identity-providers/team-sync-options": {
      "get": {
        "operationId": "getIdentityProviderTeamSyncOptions",
        "tags": [
          "Identity Providers"
        ],
        "description": "Get identity providers as minimal team-sync options (id, name, and groups extraction template) for linking external groups to teams\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "providerId": {
                        "type": "string"
                      },
                      "groupsExpression": {
                        "nullable": true,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "providerId",
                      "groupsExpression"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/identity-providers/idp-logout-url": {
      "get": {
        "operationId": "getIdentityProviderIdpLogoutUrl",
        "tags": [
          "Identity Providers"
        ],
        "description": "Get the IdP logout URL for the current user's identity provider\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/identity-providers/{id}/link-status": {
      "get": {
        "operationId": "getIdentityProviderLinkStatus",
        "tags": [
          "Identity Providers"
        ],
        "description": "Get whether the current user has a usable token for this identity provider\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`mcpServerInstallation:create`: Install MCP servers from the registry",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "connected": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "providerId",
                    "connected"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "mcpServerInstallation:create"
          ]
        }
      }
    },
    "/api/identity-providers/{id}/latest-id-token-claims": {
      "get": {
        "operationId": "getIdentityProviderLatestIdTokenClaims",
        "tags": [
          "Identity Providers"
        ],
        "description": "Get decoded claims from the current user's latest identity-provider tokens\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providerId": {
                      "type": "string"
                    },
                    "claims": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "accessTokenClaims": {
                      "nullable": true,
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "accessTokenExpiresAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "providerId",
                    "claims",
                    "accessTokenClaims",
                    "accessTokenExpiresAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/identity-providers/{id}": {
      "get": {
        "operationId": "getIdentityProvider",
        "tags": [
          "Identity Providers"
        ],
        "description": "Get identity provider by ID\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`identityProvider:read`: View identity provider configurations (SSO)",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "issuer": {
                      "type": "string"
                    },
                    "oidcConfig": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "string"
                        },
                        "skipDiscovery": {
                          "type": "boolean"
                        },
                        "pkce": {
                          "type": "boolean"
                        },
                        "enableRpInitiatedLogout": {
                          "type": "boolean"
                        },
                        "hd": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        },
                        "authorizationEndpoint": {
                          "type": "string"
                        },
                        "discoveryEndpoint": {
                          "type": "string"
                        },
                        "userInfoEndpoint": {
                          "type": "string"
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "overrideUserInfo": {
                          "type": "boolean"
                        },
                        "tokenEndpoint": {
                          "type": "string"
                        },
                        "tokenEndpointAuthentication": {
                          "type": "string",
                          "enum": [
                            "client_secret_post",
                            "client_secret_basic",
                            "private_key_jwt"
                          ]
                        },
                        "jwksEndpoint": {
                          "type": "string"
                        },
                        "enterpriseManagedCredentials": {
                          "type": "object",
                          "properties": {
                            "exchangeStrategy": {
                              "type": "string",
                              "enum": [
                                "rfc8693",
                                "okta_managed",
                                "entra_obo"
                              ]
                            },
                            "clientId": {
                              "type": "string"
                            },
                            "clientSecret": {
                              "type": "string"
                            },
                            "tokenEndpoint": {
                              "type": "string"
                            },
                            "tokenEndpointAuthentication": {
                              "type": "string",
                              "enum": [
                                "client_secret_post",
                                "client_secret_basic",
                                "private_key_jwt"
                              ]
                            },
                            "privateKeyPem": {
                              "type": "string"
                            },
                            "privateKeyId": {
                              "type": "string"
                            },
                            "clientAssertionAudience": {
                              "type": "string"
                            },
                            "subjectTokenType": {
                              "type": "string",
                              "enum": [
                                "urn:ietf:params:oauth:token-type:access_token",
                                "urn:ietf:params:oauth:token-type:id_token",
                                "urn:ietf:params:oauth:token-type:jwt"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "mapping": {
                          "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3",
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "emailVerified": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "image": {
                              "type": "string"
                            },
                            "extraFields": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "issuer",
                        "pkce",
                        "clientId",
                        "clientSecret",
                        "discoveryEndpoint"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22"
                    },
                    "samlConfig": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "string"
                        },
                        "entryPoint": {
                          "type": "string"
                        },
                        "cert": {
                          "type": "string"
                        },
                        "callbackUrl": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "idpMetadata": {
                          "type": "object",
                          "properties": {
                            "metadata": {
                              "type": "string"
                            },
                            "entityID": {
                              "type": "string"
                            },
                            "entityURL": {
                              "type": "string"
                            },
                            "redirectURL": {
                              "type": "string"
                            },
                            "cert": {
                              "type": "string"
                            },
                            "privateKey": {
                              "type": "string"
                            },
                            "privateKeyPass": {
                              "type": "string"
                            },
                            "isAssertionEncrypted": {
                              "type": "boolean"
                            },
                            "encPrivateKey": {
                              "type": "string"
                            },
                            "encPrivateKeyPass": {
                              "type": "string"
                            },
                            "singleSignOnService": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "Binding": {
                                    "type": "string"
                                  },
                                  "Location": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "Binding",
                                  "Location"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "spMetadata": {
                          "type": "object",
                          "properties": {
                            "metadata": {
                              "type": "string"
                            },
                            "entityID": {
                              "type": "string"
                            },
                            "binding": {
                              "type": "string"
                            },
                            "privateKey": {
                              "type": "string"
                            },
                            "privateKeyPass": {
                              "type": "string"
                            },
                            "isAssertionEncrypted": {
                              "type": "boolean"
                            },
                            "encPrivateKey": {
                              "type": "string"
                            },
                            "encPrivateKeyPass": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "wantAssertionsSigned": {
                          "type": "boolean"
                        },
                        "signatureAlgorithm": {
                          "type": "string"
                        },
                        "digestAlgorithm": {
                          "type": "string"
                        },
                        "identifierFormat": {
                          "type": "string"
                        },
                        "privateKey": {
                          "type": "string"
                        },
                        "decryptionPvk": {
                          "type": "string"
                        },
                        "additionalParams": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "mapping": {
                          "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2",
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "emailVerified": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "firstName": {
                              "type": "string"
                            },
                            "lastName": {
                              "type": "string"
                            },
                            "extraFields": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "issuer",
                        "entryPoint",
                        "cert",
                        "callbackUrl",
                        "spMetadata"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40"
                    },
                    "roleMapping": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "expression": {
                                "type": "string",
                                "minLength": 1
                              },
                              "role": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "expression",
                              "role"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "defaultRole": {
                          "type": "string"
                        },
                        "strictMode": {
                          "type": "boolean"
                        },
                        "skipRoleSync": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "teamSyncConfig": {
                      "type": "object",
                      "properties": {
                        "groupsExpression": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "userId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "providerId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "domain": {
                      "type": "string"
                    },
                    "domainVerified": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "ssoLoginEnabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "issuer",
                    "userId",
                    "providerId",
                    "organizationId",
                    "domain",
                    "domainVerified",
                    "ssoLoginEnabled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "identityProvider:read"
          ]
        }
      },
      "put": {
        "operationId": "updateIdentityProvider",
        "tags": [
          "Identity Providers"
        ],
        "description": "Update identity provider\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`identityProvider:update`: Modify identity provider settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "issuer": {
                    "type": "string"
                  },
                  "oidcConfig": {
                    "type": "object",
                    "properties": {
                      "issuer": {
                        "type": "string"
                      },
                      "skipDiscovery": {
                        "type": "boolean"
                      },
                      "pkce": {
                        "type": "boolean"
                      },
                      "enableRpInitiatedLogout": {
                        "type": "boolean"
                      },
                      "hd": {
                        "type": "string"
                      },
                      "clientId": {
                        "type": "string"
                      },
                      "clientSecret": {
                        "type": "string"
                      },
                      "authorizationEndpoint": {
                        "type": "string"
                      },
                      "discoveryEndpoint": {
                        "type": "string"
                      },
                      "userInfoEndpoint": {
                        "type": "string"
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "overrideUserInfo": {
                        "type": "boolean"
                      },
                      "tokenEndpoint": {
                        "type": "string"
                      },
                      "tokenEndpointAuthentication": {
                        "type": "string",
                        "enum": [
                          "client_secret_post",
                          "client_secret_basic",
                          "private_key_jwt"
                        ]
                      },
                      "jwksEndpoint": {
                        "type": "string"
                      },
                      "enterpriseManagedCredentials": {
                        "type": "object",
                        "properties": {
                          "exchangeStrategy": {
                            "type": "string",
                            "enum": [
                              "rfc8693",
                              "okta_managed",
                              "entra_obo"
                            ]
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "clientSecret": {
                            "type": "string"
                          },
                          "tokenEndpoint": {
                            "type": "string"
                          },
                          "tokenEndpointAuthentication": {
                            "type": "string",
                            "enum": [
                              "client_secret_post",
                              "client_secret_basic",
                              "private_key_jwt"
                            ]
                          },
                          "privateKeyPem": {
                            "type": "string"
                          },
                          "privateKeyId": {
                            "type": "string"
                          },
                          "clientAssertionAudience": {
                            "type": "string"
                          },
                          "subjectTokenType": {
                            "type": "string",
                            "enum": [
                              "urn:ietf:params:oauth:token-type:access_token",
                              "urn:ietf:params:oauth:token-type:id_token",
                              "urn:ietf:params:oauth:token-type:jwt"
                            ]
                          }
                        }
                      },
                      "mapping": {
                        "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3",
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "emailVerified": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "image": {
                            "type": "string"
                          },
                          "extraFields": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "issuer",
                      "pkce",
                      "clientId",
                      "clientSecret",
                      "discoveryEndpoint"
                    ],
                    "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22"
                  },
                  "samlConfig": {
                    "type": "object",
                    "properties": {
                      "issuer": {
                        "type": "string"
                      },
                      "entryPoint": {
                        "type": "string"
                      },
                      "cert": {
                        "type": "string"
                      },
                      "callbackUrl": {
                        "type": "string"
                      },
                      "audience": {
                        "type": "string"
                      },
                      "idpMetadata": {
                        "type": "object",
                        "properties": {
                          "metadata": {
                            "type": "string"
                          },
                          "entityID": {
                            "type": "string"
                          },
                          "entityURL": {
                            "type": "string"
                          },
                          "redirectURL": {
                            "type": "string"
                          },
                          "cert": {
                            "type": "string"
                          },
                          "privateKey": {
                            "type": "string"
                          },
                          "privateKeyPass": {
                            "type": "string"
                          },
                          "isAssertionEncrypted": {
                            "type": "boolean"
                          },
                          "encPrivateKey": {
                            "type": "string"
                          },
                          "encPrivateKeyPass": {
                            "type": "string"
                          },
                          "singleSignOnService": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "Binding": {
                                  "type": "string"
                                },
                                "Location": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "Binding",
                                "Location"
                              ]
                            }
                          }
                        }
                      },
                      "spMetadata": {
                        "type": "object",
                        "properties": {
                          "metadata": {
                            "type": "string"
                          },
                          "entityID": {
                            "type": "string"
                          },
                          "binding": {
                            "type": "string"
                          },
                          "privateKey": {
                            "type": "string"
                          },
                          "privateKeyPass": {
                            "type": "string"
                          },
                          "isAssertionEncrypted": {
                            "type": "boolean"
                          },
                          "encPrivateKey": {
                            "type": "string"
                          },
                          "encPrivateKeyPass": {
                            "type": "string"
                          }
                        }
                      },
                      "wantAssertionsSigned": {
                        "type": "boolean"
                      },
                      "signatureAlgorithm": {
                        "type": "string"
                      },
                      "digestAlgorithm": {
                        "type": "string"
                      },
                      "identifierFormat": {
                        "type": "string"
                      },
                      "privateKey": {
                        "type": "string"
                      },
                      "decryptionPvk": {
                        "type": "string"
                      },
                      "additionalParams": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "mapping": {
                        "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2",
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "emailVerified": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "firstName": {
                            "type": "string"
                          },
                          "lastName": {
                            "type": "string"
                          },
                          "extraFields": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "issuer",
                      "entryPoint",
                      "cert",
                      "callbackUrl",
                      "spMetadata"
                    ],
                    "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40"
                  },
                  "roleMapping": {
                    "type": "object",
                    "properties": {
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "expression": {
                              "type": "string",
                              "minLength": 1
                            },
                            "role": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "expression",
                            "role"
                          ]
                        }
                      },
                      "defaultRole": {
                        "type": "string"
                      },
                      "strictMode": {
                        "type": "boolean"
                      },
                      "skipRoleSync": {
                        "type": "boolean"
                      }
                    }
                  },
                  "teamSyncConfig": {
                    "type": "object",
                    "properties": {
                      "groupsExpression": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    }
                  },
                  "providerId": {
                    "type": "string"
                  },
                  "domain": {
                    "type": "string"
                  },
                  "domainVerified": {
                    "nullable": true,
                    "type": "boolean"
                  },
                  "ssoLoginEnabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "issuer": {
                      "type": "string"
                    },
                    "oidcConfig": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "string"
                        },
                        "skipDiscovery": {
                          "type": "boolean"
                        },
                        "pkce": {
                          "type": "boolean"
                        },
                        "enableRpInitiatedLogout": {
                          "type": "boolean"
                        },
                        "hd": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        },
                        "authorizationEndpoint": {
                          "type": "string"
                        },
                        "discoveryEndpoint": {
                          "type": "string"
                        },
                        "userInfoEndpoint": {
                          "type": "string"
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "overrideUserInfo": {
                          "type": "boolean"
                        },
                        "tokenEndpoint": {
                          "type": "string"
                        },
                        "tokenEndpointAuthentication": {
                          "type": "string",
                          "enum": [
                            "client_secret_post",
                            "client_secret_basic",
                            "private_key_jwt"
                          ]
                        },
                        "jwksEndpoint": {
                          "type": "string"
                        },
                        "enterpriseManagedCredentials": {
                          "type": "object",
                          "properties": {
                            "exchangeStrategy": {
                              "type": "string",
                              "enum": [
                                "rfc8693",
                                "okta_managed",
                                "entra_obo"
                              ]
                            },
                            "clientId": {
                              "type": "string"
                            },
                            "clientSecret": {
                              "type": "string"
                            },
                            "tokenEndpoint": {
                              "type": "string"
                            },
                            "tokenEndpointAuthentication": {
                              "type": "string",
                              "enum": [
                                "client_secret_post",
                                "client_secret_basic",
                                "private_key_jwt"
                              ]
                            },
                            "privateKeyPem": {
                              "type": "string"
                            },
                            "privateKeyId": {
                              "type": "string"
                            },
                            "clientAssertionAudience": {
                              "type": "string"
                            },
                            "subjectTokenType": {
                              "type": "string",
                              "enum": [
                                "urn:ietf:params:oauth:token-type:access_token",
                                "urn:ietf:params:oauth:token-type:id_token",
                                "urn:ietf:params:oauth:token-type:jwt"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "mapping": {
                          "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L3",
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "emailVerified": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "image": {
                              "type": "string"
                            },
                            "extraFields": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "issuer",
                        "pkce",
                        "clientId",
                        "clientSecret",
                        "discoveryEndpoint"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L22"
                    },
                    "samlConfig": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "string"
                        },
                        "entryPoint": {
                          "type": "string"
                        },
                        "cert": {
                          "type": "string"
                        },
                        "callbackUrl": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "idpMetadata": {
                          "type": "object",
                          "properties": {
                            "metadata": {
                              "type": "string"
                            },
                            "entityID": {
                              "type": "string"
                            },
                            "entityURL": {
                              "type": "string"
                            },
                            "redirectURL": {
                              "type": "string"
                            },
                            "cert": {
                              "type": "string"
                            },
                            "privateKey": {
                              "type": "string"
                            },
                            "privateKeyPass": {
                              "type": "string"
                            },
                            "isAssertionEncrypted": {
                              "type": "boolean"
                            },
                            "encPrivateKey": {
                              "type": "string"
                            },
                            "encPrivateKeyPass": {
                              "type": "string"
                            },
                            "singleSignOnService": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "Binding": {
                                    "type": "string"
                                  },
                                  "Location": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "Binding",
                                  "Location"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "spMetadata": {
                          "type": "object",
                          "properties": {
                            "metadata": {
                              "type": "string"
                            },
                            "entityID": {
                              "type": "string"
                            },
                            "binding": {
                              "type": "string"
                            },
                            "privateKey": {
                              "type": "string"
                            },
                            "privateKeyPass": {
                              "type": "string"
                            },
                            "isAssertionEncrypted": {
                              "type": "boolean"
                            },
                            "encPrivateKey": {
                              "type": "string"
                            },
                            "encPrivateKeyPass": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "wantAssertionsSigned": {
                          "type": "boolean"
                        },
                        "signatureAlgorithm": {
                          "type": "string"
                        },
                        "digestAlgorithm": {
                          "type": "string"
                        },
                        "identifierFormat": {
                          "type": "string"
                        },
                        "privateKey": {
                          "type": "string"
                        },
                        "decryptionPvk": {
                          "type": "string"
                        },
                        "additionalParams": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "mapping": {
                          "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L12C30-L20C2",
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "emailVerified": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "firstName": {
                              "type": "string"
                            },
                            "lastName": {
                              "type": "string"
                            },
                            "extraFields": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string"
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "issuer",
                        "entryPoint",
                        "cert",
                        "callbackUrl",
                        "spMetadata"
                      ],
                      "additionalProperties": false,
                      "description": "https://github.com/better-auth/better-auth/blob/v1.4.0/packages/sso/src/types.ts#L40"
                    },
                    "roleMapping": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "expression": {
                                "type": "string",
                                "minLength": 1
                              },
                              "role": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "expression",
                              "role"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "defaultRole": {
                          "type": "string"
                        },
                        "strictMode": {
                          "type": "boolean"
                        },
                        "skipRoleSync": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "teamSyncConfig": {
                      "type": "object",
                      "properties": {
                        "groupsExpression": {
                          "type": "string"
                        },
                        "enabled": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "userId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "providerId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "nullable": true,
                      "type": "string"
                    },
                    "domain": {
                      "type": "string"
                    },
                    "domainVerified": {
                      "nullable": true,
                      "type": "boolean"
                    },
                    "ssoLoginEnabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "issuer",
                    "userId",
                    "providerId",
                    "organizationId",
                    "domain",
                    "domainVerified",
                    "ssoLoginEnabled"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "identityProvider:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteIdentityProvider",
        "tags": [
          "Identity Providers"
        ],
        "description": "Delete identity provider\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`identityProvider:delete`: Remove identity providers",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "identityProvider:delete"
          ]
        }
      }
    },
    "/api/rum/events": {
      "post": {
        "operationId": "ingestRumEvents",
        "tags": [
          "RUM"
        ],
        "description": "Ingest a batch of product-usage (RUM) events from the web client. Events are forwarded as OTLP log records to the deployment-configured collector; when no RUM export endpoint is configured the batch is acknowledged and dropped.\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\nNone (no additional RBAC permission required)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "events": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "enum": [
                            "session.start",
                            "archestra.session.heartbeat",
                            "archestra.page_view",
                            "browser.web_vital",
                            "archestra.page_load",
                            "archestra.long_task",
                            "archestra.client_error",
                            "archestra.api_request",
                            "archestra.interaction",
                            "archestra.user_authenticated",
                            "archestra.onboarding_completed",
                            "archestra.mcp_server_installed",
                            "archestra.mcp_server_uninstalled",
                            "archestra.mcp_server_installation_cancelled",
                            "archestra.mcp_server_installation_failed",
                            "archestra.knowledge_base_connector_installation_failed",
                            "archestra.message_sent",
                            "archestra.message_queued",
                            "archestra.prompt_selected",
                            "archestra.skill_created",
                            "archestra.file_uploaded"
                          ]
                        },
                        "timestampMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "maximum": 9007199254740991
                        },
                        "sessionId": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 64
                        },
                        "previousSessionId": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 64
                        },
                        "attributes": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 500
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "name",
                        "timestampMs",
                        "sessionId"
                      ]
                    }
                  }
                },
                "required": [
                  "events"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "accepted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "none",
          "note": "None (no additional RBAC permission required)",
          "permissions": []
        }
      }
    },
    "/api/teams/{teamId}/vault-folder": {
      "get": {
        "operationId": "getTeamVaultFolder",
        "tags": [
          "Teams",
          "Vault"
        ],
        "description": "Get a team's Vault folder configuration\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "teamId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "teamId": {
                      "type": "string"
                    },
                    "vaultPath": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "vaultPath",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      },
      "post": {
        "operationId": "setTeamVaultFolder",
        "tags": [
          "Teams",
          "Vault"
        ],
        "description": "Set or update a team's Vault folder path\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:update`: Modify team settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vaultPath": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "vaultPath"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "teamId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "teamId": {
                      "type": "string"
                    },
                    "vaultPath": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "teamId",
                    "vaultPath",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:update"
          ]
        }
      },
      "delete": {
        "operationId": "deleteTeamVaultFolder",
        "tags": [
          "Teams",
          "Vault"
        ],
        "description": "Delete a team's Vault folder mapping\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:update`: Modify team settings",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "teamId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:update"
          ]
        }
      }
    },
    "/api/teams/{teamId}/vault-folder/check-connectivity": {
      "post": {
        "operationId": "checkTeamVaultFolderConnectivity",
        "tags": [
          "Teams",
          "Vault"
        ],
        "description": "Check connectivity to a team's Vault folder\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:update`: Modify team settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vaultPath": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "teamId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connected": {
                      "type": "boolean"
                    },
                    "secretCount": {
                      "type": "number"
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "connected",
                    "secretCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:update"
          ]
        }
      }
    },
    "/api/teams/{teamId}/vault-folder/secrets": {
      "get": {
        "operationId": "listTeamVaultFolderSecrets",
        "tags": [
          "Teams",
          "Vault"
        ],
        "description": "List secrets available in a team's Vault folder\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "teamId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "path"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    },
    "/api/teams/{teamId}/vault-folder/secrets/keys": {
      "post": {
        "operationId": "getTeamVaultSecretKeys",
        "tags": [
          "Teams",
          "Vault"
        ],
        "description": "Get the keys of a specific secret in a team's Vault folder\n\nAuthentication:\n\nRequired. Use an authenticated browser session or send your Archestra API key in the `Authorization` header.\n\nAuthorization:\n\n`team:read`: View teams and their members",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "secretPath": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "secretPath"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "teamId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "keys"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authentication_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_authorization_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_not_found_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_conflict_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "api_internal_server_error"
                          ]
                        },
                        "internal_code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "message",
                        "type"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-required-permissions": {
          "kind": "static",
          "permissions": [
            "team:read"
          ]
        }
      }
    }
  }
}